Fix MCU dummy generation and participant dedup
This commit is contained in:
@@ -326,7 +326,8 @@ class SendEmailPreregister extends MY_Controller
|
||||
$data_send_patients = $que_patients->result_array();
|
||||
|
||||
$sql_notif_config = "SELECT
|
||||
Email_ConfigNofificationTemplate
|
||||
Email_ConfigNofificationTemplate,
|
||||
Email_ConfigNofificationSender
|
||||
FROM email_config_nofification
|
||||
WHERE Email_ConfigNofificationIsActive = 'Y'
|
||||
ORDER BY Email_ConfigNofificationID DESC
|
||||
@@ -571,6 +572,12 @@ class SendEmailPreregister extends MY_Controller
|
||||
$recipient = json_encode([
|
||||
["name" => $patient['nama_pasien'], "email" => $targetEmail]
|
||||
]);
|
||||
$senderEmail = isset($notifConfig['Email_ConfigNofificationSender'])
|
||||
? trim((string)$notifConfig['Email_ConfigNofificationSender'])
|
||||
: '';
|
||||
$sendCC = $senderEmail !== ''
|
||||
? json_encode([["name" => $senderEmail, "email" => $senderEmail]])
|
||||
: NULL;
|
||||
|
||||
$sql_cek_outbox = "SELECT PreregisterEmailOutboxID
|
||||
FROM preregister_email_outbox
|
||||
@@ -598,7 +605,7 @@ class SendEmailPreregister extends MY_Controller
|
||||
$que_insert_outbox = $this->db->query($sql_insert_outbox, [
|
||||
$subject,
|
||||
$recipient,
|
||||
NULL,
|
||||
$sendCC,
|
||||
$body,
|
||||
'PREREGIST',
|
||||
$patient['preregister_id']
|
||||
@@ -620,7 +627,7 @@ class SendEmailPreregister extends MY_Controller
|
||||
$que_update_outbox = $this->db->query($sql_update_outbox, [
|
||||
$subject,
|
||||
$recipient,
|
||||
NULL,
|
||||
$sendCC,
|
||||
$body,
|
||||
$cek_outbox[0]['PreregisterEmailOutboxID']
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user