本文整理汇总了PHP中CMbDT::isLunarDate方法的典型用法代码示例。如果您正苦于以下问题:PHP CMbDT::isLunarDate方法的具体用法?PHP CMbDT::isLunarDate怎么用?PHP CMbDT::isLunarDate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CMbDT
的用法示例。
在下文中一共展示了CMbDT::isLunarDate方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: build
/**
* Build ZFD segement
*
* @param CHL7v2Event $event Event
*
* @return null
*/
function build(CHL7v2Event $event)
{
parent::build($event);
$patient = $this->patient;
// ZFD-1: Date lunaire
if (CMbDT::isLunarDate($patient->naissance)) {
$date = explode("-", $patient->naissance);
$data[] = array($date[2], $date[1], $date[0]);
} else {
$data[] = null;
}
// ZFD-2: Nombre de semaines de gestation
$data[] = null;
$this->fill($data);
}
示例2: build
/**
* Build PID segement
*
* @param CHL7v2Event $event Event
*
* @return null
*/
function build(CHL7v2Event $event)
{
parent::build($event);
$message = $event->message;
$sender = $event->_sender;
$group = $sender->loadRefGroup();
$domains_returned = $this->domains_returned;
$patient = $this->patient;
$data = array();
// PID-1: Set ID - PID (SI) (optional)
$data[] = $this->set_id;
// PID-2: Patient ID (CX) (optional)
$data[] = null;
$identifiers = array();
if (empty($domains_returned)) {
$idex = new CIdSante400();
$idex->object_id = $patient->_id;
$idex->object_class = "CPatient";
$ljoin = array();
$ljoin[] = "group_domain AS g1 ON g1.domain_id = domain.domain_id AND g1.object_class = 'CPatient'";
foreach ($idex->loadMatchingList() as $_idex) {
$domain = new CDomain();
$where["tag"] = " = '{$_idex->tag}'";
$domain->loadObject($where, null, null, $ljoin);
if (!$domain->_id) {
continue;
}
$identifiers[] = array($_idex->id400, null, null, $this->getAssigningAuthority("domain", null, null, $domain), "MR");
}
} else {
foreach ($domains_returned as $_domain_returned) {
$assigning_authority = $this->getAssigningAuthority("domain", null, null, $_domain_returned);
$identifiers[] = array(CIdSante400::getValueFor($patient, $_domain_returned->tag), null, null, $assigning_authority, "MR");
}
}
// PID-3: Patient Identifier List (CX) (repeating)
$data[] = $identifiers;
// PID-4: Alternate Patient ID - PID (CX) (optional repeating)
$data[] = null;
// PID-5: Patient Name (XPN) (repeating)
$data[] = $this->getXPN($patient);
// PID-6: Mother's Maiden Name (XPN) (optional repeating)
$data[] = null;
// PID-7: Date/Time of Birth (TS) (optional)
$data[] = CMbDT::isLunarDate($patient->naissance) ? null : $patient->naissance;
// PID-8: Administrative Sex (IS) (optional)
// Table - 0001
// F - Female
// M - Male
// O - Other
// U - Unknown
// A - Ambiguous
// N - Not applicable
$data[] = CHL7v2TableEntry::mapTo("1", $patient->sexe);
// PID-9: Patient Alias (XPN) (optional repeating)
$data[] = null;
// PID-10: Race (CE) (optional repeating)
$data[] = null;
// PID-11: Patient Address (XAD) (optional repeating)
$address = array();
if ($patient->adresse || $patient->ville || $patient->cp) {
$linesAdress = explode("\n", $patient->adresse, 2);
$address[] = array(CValue::read($linesAdress, 0), str_replace("\n", $message->componentSeparator, CValue::read($linesAdress, 1)), $patient->ville, $patient->province, $patient->cp, CPaysInsee::getAlpha3($patient->pays_insee), "H");
}
if ($patient->lieu_naissance || $patient->cp_naissance || $patient->pays_naissance_insee) {
$address[] = array(null, null, $patient->lieu_naissance, null, $patient->cp_naissance, CPaysInsee::getAlpha3($patient->pays_naissance_insee), "BDL");
}
$data[] = $address;
// PID-12: County Code (IS) (optional)
$data[] = null;
// PID-13: Phone Number - Home (XTN) (optional repeating)
// Table - 0201
// ASN - Answering Service Number
// BPN - Beeper Number
// EMR - Emergency Number
// NET - Network (email) Address
// ORN - Other Residence Number
// PRN - Primary Residence Number
// VHN - Vacation Home Number
// WPN - Work Number
// Table - 0202
// BP - Beeper
// CP - Cellular Phone
// FX - Fax
// Internet - Internet Address: Use Only If Telecommunication Use Code Is NET
// MD - Modem
// PH - Telephone
// TDD - Telecommunications Device for the Deaf
// TTY - Teletypewriter
$phones = array();
if ($patient->tel) {
$area_city_code = null;
$local_number = null;
//.........这里部分代码省略.........
示例3: build
/**
* Build PID segement
*
* @param CHL7v2Event $event Event
*
* @return null
*/
function build(CHL7v2Event $event)
{
parent::build($event);
$message = $event->message;
$receiver = $event->_receiver;
$group = $receiver->loadRefGroup();
$patient = $this->patient;
$mother = null;
$sejour_maman = null;
$naissance = null;
if ($patient->_naissance_id) {
$naissance = new CNaissance();
$naissance->load($patient->_naissance_id);
$sejour_maman = $naissance->loadRefSejourMaman();
$sejour_maman->loadNDA($group->_id);
$sejour_maman->loadRefPatient()->loadIPP($group->_id);
$mother = $sejour_maman->_ref_patient;
}
$data = array();
// PID-1: Set ID - PID (SI) (optional)
$data[] = $this->set_id;
// PID-2: Patient ID (CX) (optional)
$data[] = null;
// PID-3: Patient Identifier List (CX) (repeating)
$data[] = $this->getPersonIdentifiers($patient, $group, $receiver);
// PID-4: Alternate Patient ID - PID (CX) (optional repeating)
$data[] = null;
// PID-5: Patient Name (XPN) (repeating)
$data[] = $this->getXPN($patient, $receiver);
// PID-6: Mother's Maiden Name (XPN) (optional repeating)
if ($patient->nom_jeune_fille && $receiver->_configs["build_PID_6"] == "nom_naissance") {
$anonyme = is_numeric($patient->nom);
$mode_identito_vigilance = $receiver->_configs["mode_identito_vigilance"];
$prenom = CPatient::applyModeIdentitoVigilance($patient->prenom, true, $mode_identito_vigilance, $anonyme);
$nom_jf = CPatient::applyModeIdentitoVigilance($patient->nom_jeune_fille, true, $mode_identito_vigilance, $anonyme);
$data[] = array(array($nom_jf, $prenom, null, null, null, null, null, "L"));
} else {
// Dans le cas d'une naissance on va mettre l'identité de la mère
$data[] = $mother ? $this->getXPN($mother, $receiver) : null;
}
// PID-7: Date/Time of Birth (TS) (optional)
if ($patient->_naissance_id) {
$data[] = $naissance->date_time;
} else {
if ($patient->naissance) {
$data[] = CMbDT::isLunarDate($patient->naissance) ? null : $patient->naissance;
} else {
$data[] = null;
}
}
// PID-8: Administrative Sex (IS) (optional)
// Table - 0001
// F - Female
// M - Male
// O - Other
// U - Unknown
// A - Ambiguous
// N - Not applicable
$sexe = CHL7v2TableEntry::mapTo("1", $patient->sexe);
$data[] = $sexe ?: "U";
// PID-9: Patient Alias (XPN) (optional repeating)
$data[] = null;
// PID-10: Race (CE) (optional repeating)
$data[] = null;
// PID-11: Patient Address (XAD) (optional repeating)
$address = array();
if ($patient->adresse || $patient->ville || $patient->cp) {
$linesAdress = explode("\n", $patient->adresse, 2);
$address[] = array(CValue::read($linesAdress, 0), str_replace("\n", $message->componentSeparator, CValue::read($linesAdress, 1)), $patient->ville, null, $patient->cp, CPaysInsee::getAlpha3($patient->pays_insee), "H");
}
if ($receiver->_configs["build_PID_11"] == "simple") {
$address = array(reset($address));
} else {
if ($patient->lieu_naissance || $patient->cp_naissance || $patient->pays_naissance_insee) {
$address[] = array(null, null, $patient->lieu_naissance, null, $patient->cp_naissance, CPaysInsee::getAlpha3($patient->pays_naissance_insee), "BDL");
}
}
$data[] = $address;
// PID-12: County Code (IS) (optional)
$data[] = null;
// PID-13: Phone Number - Home (XTN) (optional repeating)
// Table - 0201
// ASN - Answering Service Number
// BPN - Beeper Number
// EMR - Emergency Number
// NET - Network (email) Address
// ORN - Other Residence Number
// PRN - Primary Residence Number
// VHN - Vacation Home Number
// WPN - Work Number
// Table - 0202
// BP - Beeper
// CP - Cellular Phone
//.........这里部分代码省略.........
示例4: addAssure
/**
* Ajout de l'assuré
*
* @param DOMNode $elParent Node
* @param CPatient $mbPatient Patient
*
* @return void
*/
function addAssure(DOMNode $elParent, CPatient $mbPatient)
{
$this->addElement($elParent, "immatriculation", $mbPatient->matricule);
$personne = $this->addElement($elParent, "personne");
$sexeConversion = array("m" => "M", "f" => "F");
$sexe = $mbPatient->assure_sexe ? $sexeConversion[$mbPatient->assure_sexe] : "I";
$this->addAttribute($personne, "sexe", $sexe);
$assure_nom = $mbPatient->assure_nom;
$assure_nom_jeune_fille = $mbPatient->assure_nom_jeune_fille;
$assure_prenom = $mbPatient->assure_prenom;
$assure_prenom_2 = $mbPatient->assure_prenom_2;
$assure_prenom_3 = $mbPatient->assure_prenom_3;
$assure_prenom_4 = $mbPatient->assure_prenom_4;
$assure_adresse = $mbPatient->assure_adresse;
$assure_ville = $mbPatient->assure_ville;
if (isset($this->_ref_receiver->_id) && $this->_ref_receiver->_configs["uppercase_fields"]) {
$assure_nom = CMbString::upper($assure_nom);
$assure_nom_jeune_fille = CMbString::upper($assure_nom_jeune_fille);
$assure_prenom = CMbString::upper($assure_prenom);
$assure_prenom_2 = CMbString::upper($assure_prenom_2);
$assure_prenom_3 = CMbString::upper($assure_prenom_3);
$assure_prenom_4 = CMbString::upper($assure_prenom_4);
$assure_adresse = CMbString::upper($assure_adresse);
$assure_ville = CMbString::upper($assure_ville);
}
$this->addTexte($personne, "nomUsuel", $assure_nom);
$this->addTexte($personne, "nomNaissance", $assure_nom_jeune_fille);
$prenoms = $this->addElement($personne, "prenoms");
$this->addTexte($prenoms, "prenom", $assure_prenom);
$this->addTexte($prenoms, "prenom", $assure_prenom_2);
$this->addTexte($prenoms, "prenom", $assure_prenom_3);
$this->addTexte($prenoms, "prenom", $assure_prenom_4);
$adresses = $this->addElement($personne, "adresses");
$adresse = $this->addElement($adresses, "adresse");
$this->addTexte($adresse, "ligne", substr($assure_adresse, 0, 35));
$this->addTexte($adresse, "ville", $assure_ville);
if ($mbPatient->assure_pays_insee) {
$this->addElement($adresse, "pays", str_pad($mbPatient->assure_pays_insee, 3, '0', STR_PAD_LEFT));
}
$this->addElement($adresse, "codePostal", $mbPatient->assure_cp);
$dateNaissance = $this->addElement($personne, "dateNaissance");
$assureNaissance = $mbPatient->assure_naissance ? $mbPatient->assure_naissance : $mbPatient->naissance;
$this->addElement($dateNaissance, CMbDT::isLunarDate($assureNaissance) ? "dateLunaire" : "date", $assureNaissance);
$this->addElement($elParent, "lienAssure", $mbPatient->rang_beneficiaire);
}