|
@@ -505,6 +505,8 @@ WHERE r1.ddi_codex IN (" . implode(',', array_map(function ($_x) {
|
|
|
if(!function_exists('duplicate_therapy_info')) {
|
|
|
function duplicate_therapy_info($_drugs) {
|
|
|
|
|
|
+ if(!$_drugs || count($_drugs) < 2) return '';
|
|
|
+
|
|
|
$dptClasses = [];
|
|
|
foreach ($_drugs as $drug) {
|
|
|
$drug->dpt = getDptClassFromGcnSeqNo($drug->data->gcnSeqno);
|
|
@@ -532,6 +534,8 @@ if(!function_exists('duplicate_therapy_info')) {
|
|
|
if(!function_exists('duplicate_therapy_info_with_pivot')) {
|
|
|
function duplicate_therapy_info_with_pivot($_pivot, $_drugs) {
|
|
|
|
|
|
+ if(!$_drugs || count($_drugs) < 1) return '';
|
|
|
+
|
|
|
$_pivot->dpt = getDptClassFromGcnSeqNo($_pivot->data->gcnSeqno);
|
|
|
|
|
|
$dptClasses = [];
|