From 815534749a1f0c7c926f17558c8f4ab3af752c0e Mon Sep 17 00:00:00 2001 From: Marko Jovanovic Date: Wed, 22 Oct 2025 18:35:56 +0200 Subject: [PATCH] Take msgContentType into account in ContactUncontacted Command --- src/Command/ContactUncontactedCommand.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Command/ContactUncontactedCommand.php b/src/Command/ContactUncontactedCommand.php index b5bbe49..b7245a8 100644 --- a/src/Command/ContactUncontactedCommand.php +++ b/src/Command/ContactUncontactedCommand.php @@ -84,12 +84,14 @@ class ContactUncontactedCommand extends Command try { $study_id = $phoneContact->getStudyId(); $msgContentType = $phoneContact->getMsgContentType(); - $message = 'Liebe Patientin, lieber Patient, \ngerne möchten wir von Ihnen erfahren, wie zufrieden Sie mit uns sind. Wir freuen uns, wenn Sie sich die Zeit nehmen und uns Ihre Eindrücke mitteilen.\nIhre Anregungen gehen direkt zum Qualitäts- und Risikomanagement.\n\nhttps://umfragetool.ukbonn.de/login?id={$study_id} \n\nIhr UKB.\n\nSMS vom UKB abbestellen per E-Mail an: datenschutz@ukbonn.de'; + $message_1 = "Liebe Patientin, lieber Patient, \ngerne möchten wir von Ihnen erfahren, wie zufrieden Sie mit uns sind. Wir freuen uns, wenn Sie sich die Zeit nehmen und uns Ihre Eindrücke mitteilen.\nIhre Anregungen gehen direkt zum Qualitäts- und Risikomanagement.\n\nhttps://umfragetool.ukbonn.de/login?id={$study_id} \n\nIhr UKB.\n\nSMS vom UKB abbestellen per E-Mail an: datenschutz@ukbonn.de"; + $message_2 = "Liebe/r Patient, bitte teilen Sie kurz Ihre Zufriedenheit mit dem UKB mit: https://cf-rdm.info/u/{$phoneContact->getStudyIdShort()} Vielen Dank! Abmeldung per datenschutz@ukbonn.de"; + $message = $message_1; switch ($msgContentType) { case 1: break; case 2: - $message = ''; + $message = $message_2; break; } $response = $this->httpClient->request('POST', self::$apiEndpoint, [ @@ -108,7 +110,7 @@ class ContactUncontactedCommand extends Command ], 'body': { 'type': 'auto', - 'content': '' + 'content': '$message' }, 'minimumNumberOfMessageParts': 1, 'maximumNumberOfMessageParts': 8,