Skip to content
Open
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
363ee51
WIP
aluapaula Apr 24, 2026
6fe7907
Refactoring of Method saveScheduledEncounter in class EncounterContro…
aluapaula May 21, 2026
a25a72c
Refactoring of Method saveScheduledEncounter in class EncounterContro…
aluapaula May 22, 2026
11482c9
Refactoring of Method saveScheduledEncounter in class EncounterContro…
aluapaula May 22, 2026
039854b
Refactoring of Method saveScheduledEncounter in class EncounterContro…
aluapaula May 22, 2026
440adb8
Add tests for Audit, EncounterScheduled, ImmediateMail and Mail servi…
aluapaula May 28, 2026
30b2924
Fixed transactional missing a qualifier
ywarnecke May 29, 2026
40f96ad
Merge branch 'v3.4.0' into 304-add-api-for-automated-scheduled-encoun…
aluapaula May 29, 2026
15e35fd
Add API endpoint for external scheduled encounter:
aluapaula Jun 5, 2026
4c8aba6
Add API endpoint for external scheduled encounter:
aluapaula Jun 10, 2026
7ee8b01
Add API endpoint for external scheduled encounter:
aluapaula Jun 12, 2026
29f6772
updated messages for configuration label to ensure correct formatting
aluapaula Jun 18, 2026
32eaef4
improved: DTO-Validation for EncounterScheduledApiRequestDTO
aluapaula Jun 18, 2026
2d06b07
fix: DTO-Validation for EncounterScheduledApiRequestDTO
aluapaula Jun 19, 2026
76009b4
implement: EncounterScheduledApiRequestDTOValidator for Validation of…
aluapaula Jun 19, 2026
ca99ad6
Refactor scheduled encounter save flow and harden API validation
aluapaula Jul 21, 2026
d584d39
Add rate limiting filter for scheduled encounter API
aluapaula Jul 23, 2026
87fce2b
Improve rate limiting filter for scheduled encounter API, add javadoc…
aluapaula Jul 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion db/installationInit.sql
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,10 @@ INSERT INTO `configuration` (`id`, `type`, `configuration_group_id`, `parent`, `
(90, 'GENERAL', 11, 87, 9, 'FHIRViaHL7v2SendingFacility', 'STRING', NULL, 'de.imi.mopat.io.impl.EncounterExporterTemplateFHIR', 'configuration.label.ODMviaHL7SendingFacility', NULL, NULL, '87e35940-97e2-4c3e-ae6c-b35ea65717e3', '', NULL),
(91, 'GENERAL', 11, 87, 10, 'FHIRViaHL7v2ReceivingApplication', 'STRING', NULL, 'de.imi.mopat.io.impl.EncounterExporterTemplateFHIR', 'configuration.label.ODMviaHL7ReceivingApplication', NULL, NULL, 'd500a3a1-c1ce-4091-ace9-4557481dba37', '', NULL),
(92, 'GENERAL', 11, 87, 11, 'FHIRViaHL7v2ReceivingFacility', 'STRING', NULL, 'de.imi.mopat.io.impl.EncounterExporterTemplateFHIR', 'configuration.label.ODMviaHL7ReceivingFacility', NULL, NULL, '613cc529-396e-4a06-b785-158c15629d02', '', NULL),
(93, 'GENERAL', 11, 87, 11, 'FHIRViaHL7v2OBRFillerOrderNumber', 'STRING', NULL, 'de.imi.mopat.io.impl.EncounterExporterTemplateFHIR', 'configuration.label.ODMviaHL7OBRFillerOrderNumber', NULL, NULL, 'e78a6310-b2b1-4ee7-aea0-378ab33c3f73', '', NULL);
(93, 'GENERAL', 11, 87, 11, 'FHIRViaHL7v2OBRFillerOrderNumber', 'STRING', NULL, 'de.imi.mopat.io.impl.EncounterExporterTemplateFHIR', 'configuration.label.ODMviaHL7OBRFillerOrderNumber', NULL, NULL, 'e78a6310-b2b1-4ee7-aea0-378ab33c3f73', '', NULL),
(94, 'GENERAL', 1, NULL, 17, 'enableApiTokenAccess', 'BOOLEAN', NULL, 'GLOBAL', 'configuration.label.enableApiTokenAccess', NULL, NULL, '25fd8f5e-2e90-4cd1-8a30-d84c88889c5c', false, NULL),
(95, 'GENERAL', 1, 94, 18, 'apiKey', 'STRING', NULL, 'GLOBAL', 'configuration.label.apiKey', NULL, NULL, '9b48f864-8cb7-4704-82e2-12045755e2aa', '', NULL);




Expand Down
4 changes: 3 additions & 1 deletion db/installationInitTest.sql
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ INSERT INTO `configuration` (`id`, `type`, `configuration_group_id`, `parent`, `
(90, 'GENERAL', 11, 87, 9, 'FHIRViaHL7v2SendingFacility', 'STRING', NULL, 'de.imi.mopat.io.impl.EncounterExporterTemplateFHIR', 'configuration.label.ODMviaHL7SendingFacility', NULL, NULL, '87e35940-97e2-4c3e-ae6c-b35ea65717e3', '', NULL),
(91, 'GENERAL', 11, 87, 10, 'FHIRViaHL7v2ReceivingApplication', 'STRING', NULL, 'de.imi.mopat.io.impl.EncounterExporterTemplateFHIR', 'configuration.label.ODMviaHL7ReceivingApplication', NULL, NULL, 'd500a3a1-c1ce-4091-ace9-4557481dba37', '', NULL),
(92, 'GENERAL', 11, 87, 11, 'FHIRViaHL7v2ReceivingFacility', 'STRING', NULL, 'de.imi.mopat.io.impl.EncounterExporterTemplateFHIR', 'configuration.label.ODMviaHL7ReceivingFacility', NULL, NULL, '613cc529-396e-4a06-b785-158c15629d02', '', NULL),
(93, 'GENERAL', 11, 87, 11, 'FHIRViaHL7v2OBRFillerOrderNumber', 'STRING', NULL, 'de.imi.mopat.io.impl.EncounterExporterTemplateFHIR', 'configuration.label.ODMviaHL7OBRFillerOrderNumber', NULL, NULL, 'e78a6310-b2b1-4ee7-aea0-378ab33c3f73', '', NULL);
(93, 'GENERAL', 11, 87, 11, 'FHIRViaHL7v2OBRFillerOrderNumber', 'STRING', NULL, 'de.imi.mopat.io.impl.EncounterExporterTemplateFHIR', 'configuration.label.ODMviaHL7OBRFillerOrderNumber', NULL, NULL, 'e78a6310-b2b1-4ee7-aea0-378ab33c3f73', '', NULL),
(94, 'GENERAL', 1, NULL, 17, 'enableApiTokenAccess', 'BOOLEAN', NULL, 'GLOBAL', 'configuration.label.enableApiTokenAccess', NULL, NULL, '25fd8f5e-2e90-4cd1-8a30-d84c88889c5c', false, NULL),
(95, 'GENERAL', 1, 94, 18, 'apiKey', 'STRING', NULL, 'GLOBAL', 'configuration.label.apiKey', NULL, NULL, '9b48f864-8cb7-4704-82e2-12045755e2aa', '', NULL);


CREATE TABLE IF NOT EXISTS `clinic_configuration` (
Expand Down
14 changes: 14 additions & 0 deletions db/update/v3.4.0.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
USE `moPat`;

SELECT MAX(id)
INTO @largest_id
FROM moPat.configuration;

-- Configuration may change with changing groups added. Please make sure this fits to your server config.
-- Adjust configuration_group_id to fit to your FHIR config group. Copy the values for all available FHIR configs on the server
-- You can find the ids with this query:
-- SELECT id FROM moPat.configuration_group WHERE configuration_group.label_message_code LIKE '%FHIR';
-- On a server with no additional config groups, the id should be 11

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please adjust this. It is not specific to FHIR anymore

INSERT INTO moPat.configuration (`id`, `type`, `configuration_group_id`, `parent`, `position`, `attribute`, `configuration_type`, `description_message_code`, `class`, `label_message_code`, `test_method`, `update_method`, `uuid`, `value`, `pattern`) VALUES
Comment thread
aluapaula marked this conversation as resolved.
(@largest_id + 1, 'GENERAL', 1, NULL, 17, 'enableApiTokenAccess', 'BOOLEAN', 'configuration.label.enableApiTokenAccess', 'GLOBAL', 'configuration.label.enableApiTokenAccess', NULL, NULL, '25fd8f5e-2e90-4cd1-8a30-d84c88889c5c', false, NULL),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please adjust the description message. It should not be the same as the label. Also for this feature, the description should be a disclaimer, how this feature opens up the application and allows everybody with the API key to create new encounters.

(@largest_id + 2, 'GENERAL', 1, 17, 18, 'apiKey', 'STRING', 'configuration.label.apiKey', 'GLOBAL', 'configuration.label.apiKey', NULL, NULL, '9b48f864-8cb7-4704-82e2-12045755e2aa', '', NULL);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parent has to be adjusted. It needs to be @largest_id +1

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also adjust these changes in the other db scripts

6 changes: 6 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -966,6 +966,12 @@
<type>jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>RELEASE</version>
<scope>test</scope>
</dependency>
</dependencies>
<repositories>
<repository>
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/de/imi/mopat/config/AppConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@
@ComponentScan(basePackages = {"de.imi.mopat.auth", "de.imi.mopat.config",
"de.imi.mopat.controller", "de.imi.mopat.cron", "de.imi.mopat.dao", "de.imi.mopat.helper.model",
"de.imi.mopat.helper.controller", "de.imi.mopat.io", "de.imi.mopat.io.impl", "de.imi.mopat.io.importer",
"de.imi.mopat.io.importer.fhir", "de.imi.mopat.io.importer.odm", "de.imi.mopat.model", "de.imi.mopat.validator"})
"de.imi.mopat.io.importer.fhir", "de.imi.mopat.io.importer.odm", "de.imi.mopat.model",
"de.imi.mopat.validator","de.imi.mopat.service"})

@PropertySources({
@PropertySource("classpath:mopat.properties"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,8 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
"/mobile/survey/pseudonym",
"/error/maintenance",
"/error/internalservererror",
"/error/accessdenied"
"/error/accessdenied",
"/encounter/schedule/api"
).permitAll()
// Login page GET
.requestMatchers(HttpMethod.GET, "/mobile/user/login").permitAll()
Expand Down
10 changes: 2 additions & 8 deletions src/main/java/de/imi/mopat/controller/BundleController.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,13 @@
import de.imi.mopat.dao.AnswerDao;
import de.imi.mopat.dao.BundleDao;
import de.imi.mopat.dao.ConditionDao;
import de.imi.mopat.dao.ExportTemplateDao;
import de.imi.mopat.dao.QuestionnaireDao;
import de.imi.mopat.dao.ScoreDao;
import de.imi.mopat.dao.user.AclClassDao;
import de.imi.mopat.dao.user.AclObjectIdentityDao;
import de.imi.mopat.helper.controller.AuthService;
import de.imi.mopat.helper.controller.BundleService;
import de.imi.mopat.service.BundleService;
import de.imi.mopat.helper.controller.LocaleHelper;
import de.imi.mopat.helper.controller.UserService;
import de.imi.mopat.helper.controller.ClinicService;
import de.imi.mopat.helper.model.BundleDTOMapper;
import de.imi.mopat.helper.model.QuestionnaireDTOMapper;
import de.imi.mopat.service.ClinicService;
import de.imi.mopat.model.Answer;
import de.imi.mopat.model.Bundle;
import de.imi.mopat.model.BundleClinic;
Expand All @@ -26,7 +21,6 @@
import de.imi.mopat.model.conditions.SelectAnswerCondition;
import de.imi.mopat.model.conditions.SliderAnswerThresholdCondition;
import de.imi.mopat.model.dto.BundleDTO;
import de.imi.mopat.model.dto.BundleQuestionnaireDTO;
import de.imi.mopat.model.dto.QuestionnaireDTO;
import de.imi.mopat.validator.BundleDTOValidator;

Expand Down
10 changes: 5 additions & 5 deletions src/main/java/de/imi/mopat/controller/ClinicController.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
import de.imi.mopat.helper.model.BundleDTOMapper;
import de.imi.mopat.helper.model.ClinicConfigurationDTOMapper;
import de.imi.mopat.helper.model.ClinicDTOMapper;
import de.imi.mopat.helper.controller.UserService;
import de.imi.mopat.service.UserService;
import de.imi.mopat.model.Bundle;
import de.imi.mopat.model.BundleClinic;
import de.imi.mopat.model.Clinic;
import de.imi.mopat.helper.controller.ClinicConfigurationMappingService;
import de.imi.mopat.helper.controller.ClinicConfigurationService;
import de.imi.mopat.helper.controller.ClinicService;
import de.imi.mopat.helper.controller.ConfigurationService;
import de.imi.mopat.service.ClinicConfigurationMappingService;
import de.imi.mopat.service.ClinicConfigurationService;
import de.imi.mopat.service.ClinicService;
import de.imi.mopat.service.ConfigurationService;
import de.imi.mopat.model.*;
import de.imi.mopat.model.dto.*;
import de.imi.mopat.model.user.User;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import de.imi.mopat.dao.ConditionDao;
import de.imi.mopat.dao.QuestionDao;
import de.imi.mopat.dao.QuestionnaireDao;
import de.imi.mopat.helper.controller.ConditionService;
import de.imi.mopat.service.ConditionService;
import de.imi.mopat.helper.model.BundleDTOMapper;
import de.imi.mopat.helper.model.ConditionDTOMapper;
import de.imi.mopat.model.Answer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import com.mchange.v1.db.sql.UnsupportedTypeException;
import de.imi.mopat.dao.ConfigurationDao;
import de.imi.mopat.dao.ConfigurationGroupDao;
import de.imi.mopat.helper.controller.ConfigurationService;
import de.imi.mopat.service.ConfigurationService;
import de.imi.mopat.helper.controller.MailSender;
import de.imi.mopat.helper.controller.MultiPartFileUploadBean;
import de.imi.mopat.helper.controller.StringUtilities;
Expand Down
Loading
Loading