diff --git a/dcm4chee-arc-assembly/src/main/resources/ldap/apacheds/dcm4chee-archive.ldif b/dcm4chee-arc-assembly/src/main/resources/ldap/apacheds/dcm4chee-archive.ldif index b19dcbe6a..0039e8b7e 100644 --- a/dcm4chee-arc-assembly/src/main/resources/ldap/apacheds/dcm4chee-archive.ldif +++ b/dcm4chee-arc-assembly/src/main/resources/ldap/apacheds/dcm4chee-archive.ldif @@ -1,4 +1,4 @@ -# Generated by Apache Directory Studio on November 19, 2024, 2:23:52 PM +# Generated by Apache Directory Studio on December 5, 2024, 3:25:00 PM # SCHEMA "DCM4CHEE-ARCHIVE" dn: cn=dcm4chee-archive, ou=schema @@ -6,6 +6,7 @@ objectclass: metaSchema objectclass: top cn: dcm4chee-archive m-dependencies: dcm4che +m-dependencies: system m-dependencies: dicom dn: ou=attributetypes, cn=dcm4chee-archive, ou=schema @@ -6500,6 +6501,19 @@ m-equality: caseExactMatch m-syntax: 1.3.6.1.4.1.1466.115.121.1.15 m-singleValue: TRUE +dn: m-oid=1.2.40.0.13.1.15.110.3.487, ou=attributetypes, cn=dcm4chee-archive, ou + =schema +objectclass: metaAttributeType +objectclass: metaTop +objectclass: top +m-oid: 1.2.40.0.13.1.15.110.3.487 +m-name: hl7NoPatientUpdateMessageType +m-description: Patient record will be not be updated by HL7 messages of specifie + d Message Type(s) (MessageType^TriggerEvent). +m-equality: caseExactMatch +m-substr: caseExactSubstringsMatch +m-syntax: 1.3.6.1.4.1.1466.115.121.1.15 + dn: ou=comparators, cn=dcm4chee-archive, ou=schema objectclass: organizationalUnit objectclass: top @@ -6585,6 +6599,7 @@ m-may: hl7ErrorLogFilePattern m-may: hl7OutgoingLogFilePattern m-may: hl7OutgoingErrorLogFilePattern m-may: hl7NoPatientCreateMessageType +m-may: hl7NoPatientUpdateMessageType m-may: hl7UseNullValue m-may: hl7ImportReportAdjustIUID m-may: hl7PrimaryAssigningAuthorityOfPatientID @@ -7350,6 +7365,7 @@ m-may: hl7ErrorLogFilePattern m-may: hl7OutgoingLogFilePattern m-may: hl7OutgoingErrorLogFilePattern m-may: hl7NoPatientCreateMessageType +m-may: hl7NoPatientUpdateMessageType m-may: dcmUnzipVendorDataToURI m-may: dcmPurgeQueueMessagePollingInterval m-may: dcmPurgeQueueMessageFetchSize diff --git a/dcm4chee-arc-assembly/src/main/resources/ldap/opendj/12-dcm4chee-archive.ldif b/dcm4chee-arc-assembly/src/main/resources/ldap/opendj/12-dcm4chee-archive.ldif index 679b0dbee..ecf6f5cf2 100644 --- a/dcm4chee-arc-assembly/src/main/resources/ldap/opendj/12-dcm4chee-archive.ldif +++ b/dcm4chee-arc-assembly/src/main/resources/ldap/opendj/12-dcm4chee-archive.ldif @@ -2371,6 +2371,11 @@ attributeTypes: ( 1.2.40.0.13.1.15.110.3.486 NAME 'dcmCheckExistFilePath' EQUALITY caseExactMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE ) +attributeTypes: ( 1.2.40.0.13.1.15.110.3.487 NAME 'hl7NoPatientUpdateMessageType' + DESC 'Patient record will be not be updated by HL7 messages of specified Message Type(s) (MessageType^TriggerEvent).' + EQUALITY caseExactMatch + SUBSTR caseExactSubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 ) objectClasses: ( 1.2.40.0.13.1.15.110.4.4 NAME 'dcmArchiveDevice' DESC 'DICOM Archive Device related information' SUP top AUXILIARY @@ -2532,6 +2537,7 @@ objectClasses: ( 1.2.40.0.13.1.15.110.4.4 NAME 'dcmArchiveDevice' hl7OutgoingLogFilePattern $ hl7OutgoingErrorLogFilePattern $ hl7NoPatientCreateMessageType $ + hl7NoPatientUpdateMessageType $ dcmUnzipVendorDataToURI $ dcmPurgeQueueMessagePollingInterval $ dcmPurgeQueueMessageFetchSize $ @@ -2837,6 +2843,7 @@ objectClasses: ( 1.2.40.0.13.1.15.110.4.11 NAME 'dcmArchiveHL7Application' hl7OutgoingLogFilePattern $ hl7OutgoingErrorLogFilePattern $ hl7NoPatientCreateMessageType $ + hl7NoPatientUpdateMessageType $ hl7UseNullValue $ hl7ImportReportAdjustIUID $ hl7PrimaryAssigningAuthorityOfPatientID $ diff --git a/dcm4chee-arc-assembly/src/main/resources/ldap/schema/dcm4chee-archive.schema b/dcm4chee-arc-assembly/src/main/resources/ldap/schema/dcm4chee-archive.schema index 5ccb2bc58..d59e24dba 100644 --- a/dcm4chee-arc-assembly/src/main/resources/ldap/schema/dcm4chee-archive.schema +++ b/dcm4chee-arc-assembly/src/main/resources/ldap/schema/dcm4chee-archive.schema @@ -2847,6 +2847,12 @@ attributetype ( 1.2.40.0.13.1.15.110.3.486 NAME 'dcmCheckExistFilePath' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE ) +attributetype ( 1.2.40.0.13.1.15.110.3.487 NAME 'hl7NoPatientUpdateMessageType' + DESC 'Patient record will be not be updated by HL7 messages of specified Message Type(s) (MessageType^TriggerEvent).' + EQUALITY caseExactMatch + SUBSTR caseExactSubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 ) + objectclass ( 1.2.40.0.13.1.15.110.4.4 NAME 'dcmArchiveDevice' DESC 'DICOM Archive Device related information' SUP top AUXILIARY @@ -3008,6 +3014,7 @@ objectclass ( 1.2.40.0.13.1.15.110.4.4 NAME 'dcmArchiveDevice' hl7OutgoingLogFilePattern $ hl7OutgoingErrorLogFilePattern $ hl7NoPatientCreateMessageType $ + hl7NoPatientUpdateMessageType $ dcmUnzipVendorDataToURI $ dcmPurgeQueueMessagePollingInterval $ dcmPurgeQueueMessageFetchSize $ @@ -3316,6 +3323,7 @@ objectclass ( 1.2.40.0.13.1.15.110.4.11 NAME 'dcmArchiveHL7Application' hl7OutgoingLogFilePattern $ hl7OutgoingErrorLogFilePattern $ hl7NoPatientCreateMessageType $ + hl7NoPatientUpdateMessageType $ hl7UseNullValue $ hl7ImportReportAdjustIUID $ hl7PrimaryAssigningAuthorityOfPatientID $ diff --git a/dcm4chee-arc-assembly/src/main/resources/ldap/slapd/dcm4chee-archive.ldif b/dcm4chee-arc-assembly/src/main/resources/ldap/slapd/dcm4chee-archive.ldif index a0e104b42..ffca6ea2f 100644 --- a/dcm4chee-arc-assembly/src/main/resources/ldap/slapd/dcm4chee-archive.ldif +++ b/dcm4chee-arc-assembly/src/main/resources/ldap/slapd/dcm4chee-archive.ldif @@ -2370,6 +2370,11 @@ olcAttributeTypes: ( 1.2.40.0.13.1.15.110.3.486 NAME 'dcmCheckExistFilePath' EQUALITY caseExactMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE ) +olcAttributeTypes: ( 1.2.40.0.13.1.15.110.3.487 NAME 'hl7NoPatientUpdateMessageType' + DESC 'Patient record will be not be updated by HL7 messages of specified Message Type(s) (MessageType^TriggerEvent).' + EQUALITY caseExactMatch + SUBSTR caseExactSubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 ) olcObjectClasses: ( 1.2.40.0.13.1.15.110.4.4 NAME 'dcmArchiveDevice' DESC 'DICOM Archive Device related information' SUP top AUXILIARY @@ -2531,6 +2536,7 @@ olcObjectClasses: ( 1.2.40.0.13.1.15.110.4.4 NAME 'dcmArchiveDevice' hl7OutgoingLogFilePattern $ hl7OutgoingErrorLogFilePattern $ hl7NoPatientCreateMessageType $ + hl7NoPatientUpdateMessageType $ dcmUnzipVendorDataToURI $ dcmPurgeQueueMessagePollingInterval $ dcmPurgeQueueMessageFetchSize $ @@ -2836,6 +2842,7 @@ olcObjectClasses: ( 1.2.40.0.13.1.15.110.4.11 NAME 'dcmArchiveHL7Application' hl7OutgoingLogFilePattern $ hl7OutgoingErrorLogFilePattern $ hl7NoPatientCreateMessageType $ + hl7NoPatientUpdateMessageType $ hl7UseNullValue $ hl7ImportReportAdjustIUID $ hl7PrimaryAssigningAuthorityOfPatientID $ diff --git a/dcm4chee-arc-conf-json/src/main/java/org/dcm4chee/arc/conf/json/JsonArchiveConfiguration.java b/dcm4chee-arc-conf-json/src/main/java/org/dcm4chee/arc/conf/json/JsonArchiveConfiguration.java index db335033c..2e9defcbe 100644 --- a/dcm4chee-arc-conf-json/src/main/java/org/dcm4chee/arc/conf/json/JsonArchiveConfiguration.java +++ b/dcm4chee-arc-conf-json/src/main/java/org/dcm4chee/arc/conf/json/JsonArchiveConfiguration.java @@ -327,6 +327,7 @@ protected void storeTo(Device device, JsonWriter writer) { writer.writeNotNullOrDef("hl7ScheduledStationAETInOrder", arcDev.getHL7ScheduledStationAETInOrder(), null); writer.writeNotEmpty("hl7NoPatientCreateMessageType", arcDev.getHL7NoPatientCreateMessageTypes()); + writer.writeNotEmpty("hl7NoPatientUpdateMessageType", arcDev.getHL7NoPatientUpdateMessageTypes()); writer.writeNotNullOrDef("dcmAuditUnknownStudyInstanceUID", arcDev.getAuditUnknownStudyInstanceUID(), ArchiveDeviceExtension.AUDIT_UNKNOWN_STUDY_INSTANCE_UID); writer.writeNotNullOrDef("dcmAuditUnknownPatientID", @@ -1973,6 +1974,9 @@ private void loadFrom(ArchiveDeviceExtension arcDev, JsonReader reader, Configur case "hl7NoPatientCreateMessageType": arcDev.setHL7NoPatientCreateMessageTypes(reader.stringArray()); break; + case "hl7NoPatientUpdateMessageType": + arcDev.setHL7NoPatientUpdateMessageTypes(reader.stringArray()); + break; case "dcmAuditUnknownStudyInstanceUID": arcDev.setAuditUnknownStudyInstanceUID(reader.stringValue()); break; diff --git a/dcm4chee-arc-conf-json/src/main/java/org/dcm4chee/arc/conf/json/JsonArchiveHL7Configuration.java b/dcm4chee-arc-conf-json/src/main/java/org/dcm4chee/arc/conf/json/JsonArchiveHL7Configuration.java index 55f2ce4ed..1602839ee 100644 --- a/dcm4chee-arc-conf-json/src/main/java/org/dcm4chee/arc/conf/json/JsonArchiveHL7Configuration.java +++ b/dcm4chee-arc-conf-json/src/main/java/org/dcm4chee/arc/conf/json/JsonArchiveHL7Configuration.java @@ -76,6 +76,7 @@ public void storeTo(HL7Application hl7App, Device device, JsonWriter writer) { writer.writeNotNullOrDef("hl7ScheduledProtocolCodeInOrder", ext.getHL7ScheduledProtocolCodeInOrder(), null); writer.writeNotNullOrDef("hl7ScheduledStationAETInOrder", ext.getHL7ScheduledStationAETInOrder(), null); writer.writeNotEmpty("hl7NoPatientCreateMessageType", ext.getHL7NoPatientCreateMessageTypes()); + writer.writeNotEmpty("hl7NoPatientUpdateMessageType", ext.getHL7NoPatientUpdateMessageTypes()); writer.writeNotNull("hl7UseNullValue", ext.getHL7UseNullValue()); writer.writeNotNullOrDef("hl7PrimaryAssigningAuthorityOfPatientID", ext.getHL7PrimaryAssigningAuthorityOfPatientID(), null); @@ -171,6 +172,9 @@ private void loadFrom(ArchiveHL7ApplicationExtension ext, JsonReader reader, Con case "hl7NoPatientCreateMessageType": ext.setHL7NoPatientCreateMessageTypes(reader.stringArray()); break; + case "hl7NoPatientUpdateMessageType": + ext.setHL7NoPatientUpdateMessageTypes(reader.stringArray()); + break; case "hl7UseNullValue": ext.setHL7UseNullValue(reader.booleanValue()); break; diff --git a/dcm4chee-arc-conf-ldap/src/main/java/org/dcm4chee/arc/conf/ldap/LdapArchiveConfiguration.java b/dcm4chee-arc-conf-ldap/src/main/java/org/dcm4chee/arc/conf/ldap/LdapArchiveConfiguration.java index ff73baeb8..4ab7bec3b 100644 --- a/dcm4chee-arc-conf-ldap/src/main/java/org/dcm4chee/arc/conf/ldap/LdapArchiveConfiguration.java +++ b/dcm4chee-arc-conf-ldap/src/main/java/org/dcm4chee/arc/conf/ldap/LdapArchiveConfiguration.java @@ -416,6 +416,8 @@ protected void storeTo(ConfigurationChanges.ModifiedObject ldapObj, Device devic ext.getHL7ScheduledStationAETInOrder(), null); LdapUtils.storeNotEmpty(ldapObj, attrs, "hl7NoPatientCreateMessageType", ext.getHL7NoPatientCreateMessageTypes()); + LdapUtils.storeNotEmpty(ldapObj, attrs, "hl7NoPatientUpdateMessageType", + ext.getHL7NoPatientUpdateMessageTypes()); LdapUtils.storeNotNullOrDef(ldapObj, attrs, "dcmAuditUnknownStudyInstanceUID", ext.getAuditUnknownStudyInstanceUID(), ArchiveDeviceExtension.AUDIT_UNKNOWN_STUDY_INSTANCE_UID); LdapUtils.storeNotNullOrDef(ldapObj, attrs, "dcmAuditUnknownPatientID", @@ -812,6 +814,7 @@ protected void loadFrom(Device device, Attributes attrs) throws NamingException ext.setHL7ScheduledStationAETInOrder(LdapUtils.enumValue(ScheduledStationAETInOrder.class, attrs.get("hl7ScheduledStationAETInOrder"), null)); ext.setHL7NoPatientCreateMessageTypes(LdapUtils.stringArray(attrs.get("hl7NoPatientCreateMessageType"))); + ext.setHL7NoPatientUpdateMessageTypes(LdapUtils.stringArray(attrs.get("hl7NoPatientUpdateMessageType"))); ext.setAuditUnknownStudyInstanceUID(LdapUtils.stringValue( attrs.get("dcmAuditUnknownStudyInstanceUID"), ArchiveDeviceExtension.AUDIT_UNKNOWN_STUDY_INSTANCE_UID)); ext.setAuditUnknownPatientID(LdapUtils.stringValue( @@ -1370,6 +1373,8 @@ protected void storeDiffs(ConfigurationChanges.ModifiedObject ldapObj, Device pr aa.getHL7ScheduledStationAETInOrder(), bb.getHL7ScheduledStationAETInOrder(), null); LdapUtils.storeDiff(ldapObj, mods, "hl7NoPatientCreateMessageType", aa.getHL7NoPatientCreateMessageTypes(), bb.getHL7NoPatientCreateMessageTypes()); + LdapUtils.storeDiff(ldapObj, mods, "hl7NoPatientUpdateMessageType", + aa.getHL7NoPatientUpdateMessageTypes(), bb.getHL7NoPatientUpdateMessageTypes()); LdapUtils.storeDiffObject(ldapObj, mods, "dcmAuditUnknownStudyInstanceUID", aa.getAuditUnknownStudyInstanceUID(), bb.getAuditUnknownStudyInstanceUID(), ArchiveDeviceExtension.AUDIT_UNKNOWN_STUDY_INSTANCE_UID); diff --git a/dcm4chee-arc-conf-ldap/src/main/java/org/dcm4chee/arc/conf/ldap/LdapArchiveHL7Configuration.java b/dcm4chee-arc-conf-ldap/src/main/java/org/dcm4chee/arc/conf/ldap/LdapArchiveHL7Configuration.java index 6f088d7f0..f14bf34e9 100644 --- a/dcm4chee-arc-conf-ldap/src/main/java/org/dcm4chee/arc/conf/ldap/LdapArchiveHL7Configuration.java +++ b/dcm4chee-arc-conf-ldap/src/main/java/org/dcm4chee/arc/conf/ldap/LdapArchiveHL7Configuration.java @@ -91,6 +91,7 @@ public void storeTo(ConfigurationChanges.ModifiedObject ldapObj, HL7Application LdapUtils.storeNotNullOrDef(ldapObj, attrs, "hl7ScheduledStationAETInOrder", ext.getHL7ScheduledStationAETInOrder(), null); LdapUtils.storeNotEmpty(ldapObj, attrs, "hl7NoPatientCreateMessageType", ext.getHL7NoPatientCreateMessageTypes()); + LdapUtils.storeNotEmpty(ldapObj, attrs, "hl7NoPatientUpdateMessageType", ext.getHL7NoPatientUpdateMessageTypes()); LdapUtils.storeNotNullOrDef(ldapObj, attrs, "hl7UseNullValue", ext.getHL7UseNullValue(), null); LdapUtils.storeNotNullOrDef(ldapObj, attrs, "hl7PrimaryAssigningAuthorityOfPatientID", ext.getHL7PrimaryAssigningAuthorityOfPatientID(), null); @@ -168,6 +169,7 @@ public void loadFrom(HL7Application hl7App, Attributes attrs) ext.setHL7ScheduledStationAETInOrder(LdapUtils.enumValue(ScheduledStationAETInOrder.class, attrs.get("hl7ScheduledStationAETInOrder"), null)); ext.setHL7NoPatientCreateMessageTypes(LdapUtils.stringArray(attrs.get("hl7NoPatientCreateMessageType"))); + ext.setHL7NoPatientUpdateMessageTypes(LdapUtils.stringArray(attrs.get("hl7NoPatientUpdateMessageType"))); ext.setHL7UseNullValue(LdapUtils.booleanValue(attrs.get("hl7UseNullValue"), null)); ext.setHL7PrimaryAssigningAuthorityOfPatientID(LdapArchiveConfiguration.toIssuer( LdapUtils.stringValue(attrs.get("hl7PrimaryAssigningAuthorityOfPatientID"), null))); @@ -262,6 +264,8 @@ public void storeDiffs(ConfigurationChanges.ModifiedObject ldapObj, HL7Applicati aa.getHL7ScheduledStationAETInOrder(), bb.getHL7ScheduledStationAETInOrder(), null); LdapUtils.storeDiff(ldapObj, mods, "hl7NoPatientCreateMessageType", aa.getHL7NoPatientCreateMessageTypes(), bb.getHL7NoPatientCreateMessageTypes()); + LdapUtils.storeDiff(ldapObj, mods, "hl7NoPatientUpdateMessageType", + aa.getHL7NoPatientUpdateMessageTypes(), bb.getHL7NoPatientUpdateMessageTypes()); LdapUtils.storeDiffObject(ldapObj, mods, "hl7UseNullValue", aa.getHL7UseNullValue(), bb.getHL7UseNullValue(), null); LdapUtils.storeDiffObject(ldapObj, mods, "hl7PrimaryAssigningAuthorityOfPatientID", diff --git a/dcm4chee-arc-conf/src/main/java/org/dcm4chee/arc/conf/ArchiveDeviceExtension.java b/dcm4chee-arc-conf/src/main/java/org/dcm4chee/arc/conf/ArchiveDeviceExtension.java index 1c2339c33..971142644 100644 --- a/dcm4chee-arc-conf/src/main/java/org/dcm4chee/arc/conf/ArchiveDeviceExtension.java +++ b/dcm4chee-arc-conf/src/main/java/org/dcm4chee/arc/conf/ArchiveDeviceExtension.java @@ -384,6 +384,7 @@ public class ArchiveDeviceExtension extends DeviceExtension { private final List mwlIdleTimeoutList = new ArrayList<>(); private final List mwlImportList = new ArrayList<>(); private final LinkedHashSet hl7NoPatientCreateMessageTypes = new LinkedHashSet<>(); + private final LinkedHashSet hl7NoPatientUpdateMessageTypes = new LinkedHashSet<>(); private final Map xRoadProperties = new HashMap<>(); private final Map impaxReportProperties = new HashMap<>(); private final Map importReportTemplateParams = new HashMap<>(); @@ -1808,6 +1809,19 @@ public boolean isHL7NoPatientCreateMessageType(String messageType) { return hl7NoPatientCreateMessageTypes.contains(messageType); } + public String[] getHL7NoPatientUpdateMessageTypes() { + return hl7NoPatientUpdateMessageTypes.toArray(new String[0]); + } + + public void setHL7NoPatientUpdateMessageTypes(String... messageTypes) { + hl7NoPatientUpdateMessageTypes.clear(); + hl7NoPatientUpdateMessageTypes.addAll(Arrays.asList(messageTypes)); + } + + public boolean isHL7NoPatientUpdateMessageType(String messageType) { + return hl7NoPatientUpdateMessageTypes.contains(messageType); + } + public Map getXRoadProperties() { return xRoadProperties; } @@ -3896,6 +3910,8 @@ public void reconfigure(DeviceExtension from) { hl7OrderSPSStatuses.putAll(arcdev.hl7OrderSPSStatuses); hl7NoPatientCreateMessageTypes.clear(); hl7NoPatientCreateMessageTypes.addAll(arcdev.hl7NoPatientCreateMessageTypes); + hl7NoPatientUpdateMessageTypes.clear(); + hl7NoPatientUpdateMessageTypes.addAll(arcdev.hl7NoPatientUpdateMessageTypes); compressionRules.clear(); compressionRules.addAll(arcdev.compressionRules); studyRetentionPolicies.clear(); diff --git a/dcm4chee-arc-conf/src/main/java/org/dcm4chee/arc/conf/ArchiveHL7ApplicationExtension.java b/dcm4chee-arc-conf/src/main/java/org/dcm4chee/arc/conf/ArchiveHL7ApplicationExtension.java index 7a00f025f..f82b55ca2 100644 --- a/dcm4chee-arc-conf/src/main/java/org/dcm4chee/arc/conf/ArchiveHL7ApplicationExtension.java +++ b/dcm4chee-arc-conf/src/main/java/org/dcm4chee/arc/conf/ArchiveHL7ApplicationExtension.java @@ -93,6 +93,7 @@ public class ArchiveHL7ApplicationExtension extends HL7ApplicationExtension{ private final ArrayList hl7StudyRetentionPolicies = new ArrayList<>(); private final EnumMap hl7OrderSPSStatuses = new EnumMap<>(SPSStatus.class); private final LinkedHashSet hl7NoPatientCreateMessageTypes = new LinkedHashSet<>(); + private final LinkedHashSet hl7NoPatientUpdateMessageTypes = new LinkedHashSet<>(); private final Map importReportTemplateParams = new HashMap<>(); public ArchiveDeviceExtension getArchiveDeviceExtension() { @@ -153,6 +154,8 @@ public void reconfigure(HL7ApplicationExtension src) { hl7OrderSPSStatuses.putAll(arcapp.hl7OrderSPSStatuses); hl7NoPatientCreateMessageTypes.clear(); hl7NoPatientCreateMessageTypes.addAll(arcapp.hl7NoPatientCreateMessageTypes); + hl7NoPatientUpdateMessageTypes.clear(); + hl7NoPatientUpdateMessageTypes.addAll(arcapp.hl7NoPatientUpdateMessageTypes); importReportTemplateParams.clear(); importReportTemplateParams.putAll(arcapp.importReportTemplateParams); } @@ -287,6 +290,21 @@ public boolean isHL7NoPatientCreateMessageType(String messageType) { : hl7NoPatientCreateMessageTypes.contains(messageType); } + public String[] getHL7NoPatientUpdateMessageTypes() { + return hl7NoPatientUpdateMessageTypes.toArray(new String[0]); + } + + public void setHL7NoPatientUpdateMessageTypes(String... messageTypes) { + hl7NoPatientUpdateMessageTypes.clear(); + hl7NoPatientUpdateMessageTypes.addAll(Arrays.asList(messageTypes)); + } + + public boolean isHL7NoPatientUpdateMessageType(String messageType) { + return hl7NoPatientUpdateMessageTypes.isEmpty() + ? getArchiveDeviceExtension().isHL7NoPatientUpdateMessageType(messageType) + : hl7NoPatientUpdateMessageTypes.contains(messageType); + } + public Boolean getHL7UseNullValue() { return hl7UseNullValue; } diff --git a/dcm4chee-arc-patient/src/main/java/org/dcm4chee/arc/patient/PatientMgtContext.java b/dcm4chee-arc-patient/src/main/java/org/dcm4chee/arc/patient/PatientMgtContext.java index a35790b9f..916ac21d3 100644 --- a/dcm4chee-arc-patient/src/main/java/org/dcm4chee/arc/patient/PatientMgtContext.java +++ b/dcm4chee-arc-patient/src/main/java/org/dcm4chee/arc/patient/PatientMgtContext.java @@ -78,6 +78,8 @@ public interface PatientMgtContext { boolean isNoPatientCreate(); + boolean isNoPatientUpdate(); + Collection getPatientIDs(); Attributes getAttributes(); diff --git a/dcm4chee-arc-patient/src/main/java/org/dcm4chee/arc/patient/impl/PatientMgtContextImpl.java b/dcm4chee-arc-patient/src/main/java/org/dcm4chee/arc/patient/impl/PatientMgtContextImpl.java index e5371a284..689615d0a 100644 --- a/dcm4chee-arc-patient/src/main/java/org/dcm4chee/arc/patient/impl/PatientMgtContextImpl.java +++ b/dcm4chee-arc-patient/src/main/java/org/dcm4chee/arc/patient/impl/PatientMgtContextImpl.java @@ -174,6 +174,16 @@ public boolean isNoPatientCreate() { return arcHL7App != null && arcHL7App.isHL7NoPatientCreateMessageType(msg.msh().getMessageType()); } + @Override + public boolean isNoPatientUpdate() { + if (hl7app == null) + return false; + + ArchiveHL7ApplicationExtension arcHL7App = + hl7app.getHL7ApplicationExtension(ArchiveHL7ApplicationExtension.class); + return arcHL7App != null && arcHL7App.isHL7NoPatientUpdateMessageType(msg.msh().getMessageType()); + } + @Override public Collection getPatientIDs() { return patientIDs; diff --git a/dcm4chee-arc-patient/src/main/java/org/dcm4chee/arc/patient/impl/PatientServiceEJB.java b/dcm4chee-arc-patient/src/main/java/org/dcm4chee/arc/patient/impl/PatientServiceEJB.java index 9f7c2abf2..493bc3de2 100644 --- a/dcm4chee-arc-patient/src/main/java/org/dcm4chee/arc/patient/impl/PatientServiceEJB.java +++ b/dcm4chee-arc-patient/src/main/java/org/dcm4chee/arc/patient/impl/PatientServiceEJB.java @@ -141,6 +141,10 @@ public Patient updatePatient(PatientMgtContext ctx) } return createPatient(ctx); } + if (ctx.isNoPatientUpdate()) { + logSuppressPatientUpdate(ctx); + return pat; + } updatePatient(pat, ctx); return pat; } @@ -149,6 +153,10 @@ private void logSuppressPatientCreate(PatientMgtContext ctx) { LOG.info("{}: Suppress creation of Patient[id={}] by {}", ctx, ctx.getPatientIDs(), ctx.getUnparsedHL7Message().msh()); } + private void logSuppressPatientUpdate(PatientMgtContext ctx) { + LOG.info("{}: Suppress update of Patient[id={}] by {}", ctx, ctx.getPatientIDs(), ctx.getUnparsedHL7Message().msh()); + } + public Patient findPatient(Collection pids) { Collection list = findPatients(pids); if (list.isEmpty())