当前位置: 首页>>代码示例>>PHP>>正文


PHP CConsultation::countBackRefs方法代码示例

本文整理汇总了PHP中CConsultation::countBackRefs方法的典型用法代码示例。如果您正苦于以下问题:PHP CConsultation::countBackRefs方法的具体用法?PHP CConsultation::countBackRefs怎么用?PHP CConsultation::countBackRefs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CConsultation的用法示例。


在下文中一共展示了CConsultation::countBackRefs方法的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}) {
//.........这里部分代码省略.........
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:101,代码来源:CConsultation.class.php


注:本文中的CConsultation::countBackRefs方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。