本文整理汇总了PHP中CConsultation::loadRefsPrescriptions方法的典型用法代码示例。如果您正苦于以下问题:PHP CConsultation::loadRefsPrescriptions方法的具体用法?PHP CConsultation::loadRefsPrescriptions怎么用?PHP CConsultation::loadRefsPrescriptions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CConsultation
的用法示例。
在下文中一共展示了CConsultation::loadRefsPrescriptions方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: makeTabsCount
/**
* @param CConsultation $consult
* @param CDossierMedical $dossier_medical
* @param CConsultAnesth $consultAnesth
* @param CSejour $sejour
* @param array $list_etat_dents
*
* @return array
*/
static function makeTabsCount($consult, $dossier_medical, $consultAnesth, $sejour, $list_etat_dents)
{
$tabs_count = array("AntTrait" => 0, "Constantes" => 0, "prescription_sejour" => 0, "facteursRisque" => 0, "Examens" => 0, "Exams" => 0, "ExamsComp" => 0, "Intub" => 0, "InfoAnesth" => 0, "dossier_traitement" => 0, "dossier_suivi" => 0, "Actes" => 0, "fdrConsult" => 0, "reglement" => 0);
if (CModule::getActive("dPprescription")) {
CPrescription::$_load_lite = true;
}
foreach ($tabs_count as $_tab => $_count) {
$count = 0;
switch ($_tab) {
case "AntTrait":
$prescription = $dossier_medical->loadRefPrescription();
$count_meds = 0;
if (CModule::getActive("dPprescription")) {
$count_meds = $prescription->countBackRefs("prescription_line_medicament");
}
$dossier_medical->countTraitements();
$dossier_medical->countAntecedents(false);
$dossier_medical->countAllergies();
$tabs_count[$_tab] = $dossier_medical->_count_antecedents + $dossier_medical->_count_allergies + $dossier_medical->_count_traitements + $count_meds + count($dossier_medical->_ext_codes_cim);
break;
case "Constantes":
if ($sejour->_ref_rpu && $sejour->_ref_rpu->_id) {
$tabs_count[$_tab] = $sejour->countBackRefs("contextes_constante");
} else {
$tabs_count[$_tab] = $consult->countBackRefs("contextes_constante");
}
break;
case "prescription_sejour":
$_sejour = $sejour;
if ($consultAnesth->_id && $consultAnesth->operation_id) {
$_sejour = $consultAnesth->loadRefOperation()->loadRefSejour();
}
if ($_sejour->_id) {
$_sejour->loadRefsPrescriptions();
foreach ($_sejour->_ref_prescriptions as $key => $_prescription) {
if (!$_prescription->_id) {
unset($_sejour->_ref_prescriptions[$key]);
continue;
}
$_sejour->_ref_prescriptions[$_prescription->_id] = $_prescription;
unset($_sejour->_ref_prescriptions[$key]);
}
if (count($_sejour->_ref_prescriptions)) {
$prescription = new CPrescription();
$prescription->massCountMedsElements($_sejour->_ref_prescriptions);
foreach ($_sejour->_ref_prescriptions as $_prescription) {
$count += array_sum($_prescription->_counts_by_chapitre);
}
}
}
$tabs_count[$_tab] = $count;
break;
case "facteursRisque":
if (!$consultAnesth) {
break;
}
if ($dossier_medical->_id) {
$fields = array("risque_antibioprophylaxie", "risque_MCJ_chirurgie", "risque_MCJ_patient", "risque_prophylaxie", "risque_thrombo_chirurgie", "risque_thrombo_patient");
foreach ($fields as $_field) {
if ($dossier_medical->{$_field} != "NR") {
$count++;
}
}
if ($dossier_medical->facteurs_risque) {
$count++;
}
}
$tabs_count[$_tab] = $count;
break;
case "Examens":
if ($consultAnesth->_id) {
break;
}
$fields = array("motif", "rques", "examen", "histoire_maladie", "conclusion");
foreach ($fields as $_field) {
if ($consult->{$_field}) {
$count++;
}
}
$count += $consult->countBackRefs("examaudio");
$count += $consult->countBackRefs("examnyha");
$count += $consult->countBackRefs("exampossum");
$tabs_count[$_tab] = $count;
break;
case "Exams":
if (!$consultAnesth->_id) {
break;
}
$fields = array("examenCardio", "examenPulmo", "examenDigest", "examenAutre");
foreach ($fields as $_field) {
if ($consultAnesth->{$_field}) {
//.........这里部分代码省略.........