diff --git a/dcm4chee-arc-retrieve/src/main/java/org/dcm4chee/arc/retrieve/impl/RetrieveServiceImpl.java b/dcm4chee-arc-retrieve/src/main/java/org/dcm4chee/arc/retrieve/impl/RetrieveServiceImpl.java index 618d3e6769..2b10b9b6e1 100644 --- a/dcm4chee-arc-retrieve/src/main/java/org/dcm4chee/arc/retrieve/impl/RetrieveServiceImpl.java +++ b/dcm4chee-arc-retrieve/src/main/java/org/dcm4chee/arc/retrieve/impl/RetrieveServiceImpl.java @@ -196,6 +196,9 @@ public RetrieveContext newRetrieveContextSTORE( public RetrieveContext newRetrieveContextSTORE( String localAET, String studyUID, String seriesUID, Sequence refSopSeq, String destAET) throws ConfigurationException { + if (refSopSeq == null || refSopSeq.isEmpty()) { + return newRetrieveContextSTORE(localAET, studyUID, seriesUID, (String) null, destAET); + } RetrieveContext ctx = newRetrieveContext(localAET, refSopSeq); ctx.setStudyInstanceUIDs(studyUID); ctx.setSeriesInstanceUIDs(seriesUID); diff --git a/dcm4chee-arc-ups-movescu/src/main/java/org/dcm4chee/arc/ups/movescu/UPSMoveSCU.java b/dcm4chee-arc-ups-movescu/src/main/java/org/dcm4chee/arc/ups/movescu/UPSMoveSCU.java index f5c676e9dc..15498bd824 100644 --- a/dcm4chee-arc-ups-movescu/src/main/java/org/dcm4chee/arc/ups/movescu/UPSMoveSCU.java +++ b/dcm4chee-arc-ups-movescu/src/main/java/org/dcm4chee/arc/ups/movescu/UPSMoveSCU.java @@ -42,7 +42,7 @@ package org.dcm4chee.arc.ups.movescu; import org.dcm4che3.data.*; -import org.dcm4che3.dcmr.ScopeOfAccumlation; +import org.dcm4che3.dcmr.ScopeOfAccumulation; import org.dcm4che3.net.Association; import org.dcm4che3.net.DimseRSP; import org.dcm4che3.net.Status; @@ -159,15 +159,15 @@ private static class KeysBuilder { KeysBuilder(Attributes ups) { Consumer retrieve = retrieveOf( - UPSUtils.getScheduledProcessingParameter(ups, ScopeOfAccumlation.CODE)); + UPSUtils.getScheduledProcessingParameter(ups, ScopeOfAccumulation.CODE)); ups.getSequence(Tag.InputInformationSequence).stream().forEach(retrieve); } private Consumer retrieveOf(Optional scopeOfAccumlation) { return scopeOfAccumlation.isPresent() ? - (scopeOfAccumlation.get().equalsIgnoreMeaning(ScopeOfAccumlation.Study) + (scopeOfAccumlation.get().equalsIgnoreMeaning(ScopeOfAccumulation.Study) ? this::retrieveStudies - : (scopeOfAccumlation.get().equalsIgnoreMeaning(ScopeOfAccumlation.Series) + : (scopeOfAccumlation.get().equalsIgnoreMeaning(ScopeOfAccumulation.Series) ? this::retrieveSeries : this::retrieveInstances)) : this::retrieveInstances; diff --git a/dcm4chee-arc-ups-storescu/src/main/java/org/dcm4chee/arc/ups/storescu/UPSStoreSCU.java b/dcm4chee-arc-ups-storescu/src/main/java/org/dcm4chee/arc/ups/storescu/UPSStoreSCU.java index 7dfd1aea34..ea051b7b99 100644 --- a/dcm4chee-arc-ups-storescu/src/main/java/org/dcm4chee/arc/ups/storescu/UPSStoreSCU.java +++ b/dcm4chee-arc-ups-storescu/src/main/java/org/dcm4chee/arc/ups/storescu/UPSStoreSCU.java @@ -44,7 +44,7 @@ import org.dcm4che3.conf.api.ConfigurationException; import org.dcm4che3.conf.api.ConfigurationNotFoundException; import org.dcm4che3.data.*; -import org.dcm4che3.dcmr.ScopeOfAccumlation; +import org.dcm4che3.dcmr.ScopeOfAccumulation; import org.dcm4che3.net.Status; import org.dcm4che3.net.service.DicomServiceException; import org.dcm4chee.arc.conf.UPSProcessingRule; @@ -112,7 +112,7 @@ private RetrieveContext calculateMatches(Attributes ups, String destAET) throws DicomServiceException { RetrieveContext retrieveContext = null; RetrieveLevel retrieveLevel = RetrieveLevel.of( - UPSUtils.getScheduledProcessingParameter(ups, ScopeOfAccumlation.CODE)); + UPSUtils.getScheduledProcessingParameter(ups, ScopeOfAccumulation.CODE)); Set suids = new HashSet<>(); for (Attributes inputInformation : ups.getSequence(Tag.InputInformationSequence)) { RetrieveContext tmp = newRetrieveContext(retrieveLevel, inputInformation, destAET, suids); @@ -179,8 +179,8 @@ RetrieveContext newRetrieveContextSTORE(RetrieveService retrieveService, String public static RetrieveLevel of(Optional scopeOfAccumlation) { return scopeOfAccumlation.isPresent() ? - (scopeOfAccumlation.get().equalsIgnoreMeaning(ScopeOfAccumlation.Study) ? STUDY : - (scopeOfAccumlation.get().equalsIgnoreMeaning(ScopeOfAccumlation.Series) ? SERIES : IMAGE)) + (scopeOfAccumlation.get().equalsIgnoreMeaning(ScopeOfAccumulation.Study) ? STUDY : + (scopeOfAccumlation.get().equalsIgnoreMeaning(ScopeOfAccumulation.Series) ? SERIES : IMAGE)) : IMAGE; } diff --git a/dcm4chee-arc-ups/src/main/java/org/dcm4chee/arc/ups/impl/UPSServiceEJB.java b/dcm4chee-arc-ups/src/main/java/org/dcm4chee/arc/ups/impl/UPSServiceEJB.java index d7669a9224..f5f62acb6f 100644 --- a/dcm4chee-arc-ups/src/main/java/org/dcm4chee/arc/ups/impl/UPSServiceEJB.java +++ b/dcm4chee-arc-ups/src/main/java/org/dcm4chee/arc/ups/impl/UPSServiceEJB.java @@ -43,7 +43,7 @@ import org.dcm4che3.data.*; import org.dcm4che3.dcmr.ProcedureDiscontinuationReasons; -import org.dcm4che3.dcmr.ScopeOfAccumlation; +import org.dcm4che3.dcmr.ScopeOfAccumulation; import org.dcm4che3.hl7.HL7Charset; import org.dcm4che3.io.SAXTransformer; import org.dcm4che3.io.TemplatesCache; @@ -821,7 +821,7 @@ private static Attributes createOnStore(StoreContext storeCtx, Calendar now, UPS && !attrs.contains(Tag.InputInformationSequence)) { updateIncludeInputInformation(attrs.newSequence(Tag.InputInformationSequence, 1), storeCtx); } - addScheduledProcessingParameter(attrs, ScopeOfAccumlation.CODE, + addScheduledProcessingParameter(attrs, ScopeOfAccumulation.CODE, toScopeOfAccumlation(rule.getScopeOfAccumulation())); return attrs; } @@ -844,11 +844,11 @@ private static Code toScopeOfAccumlation(Entity scopeOfAccumulation) { if (scopeOfAccumulation != null) switch (scopeOfAccumulation) { case Study: - return ScopeOfAccumlation.Study; + return ScopeOfAccumulation.Study; case Series: - return ScopeOfAccumlation.Series; + return ScopeOfAccumulation.Series; case MPPS: - return ScopeOfAccumlation.PerformedProcedureStep; + return ScopeOfAccumulation.PerformedProcedureStep; } return null; }