Search in sources :

Example 6 with DvMultimedia

use of com.nedap.archie.rm.datavalues.encapsulated.DvMultimedia in project openEHR_SDK by ehrbase.

the class FeederAuditRMUnmarshaller method handle.

@Override
public void handle(String currentTerm, FeederAudit rmObject, Map<FlatPathDto, String> currentValues, Context<Map<FlatPathDto, String>> context, Set<String> consumedPaths) {
    Map<FlatPathDto, String> originalContentValues = FlatHelper.filter(currentValues, currentTerm + "/original_content", false);
    if (!originalContentValues.isEmpty()) {
        rmObject.setOriginalContent(new DvParsable());
        DV_PARSABLE_RM_UNMARSHALLER.handle(currentTerm + "/original_content", (DvParsable) rmObject.getOriginalContent(), originalContentValues, context, consumedPaths);
    }
    Map<FlatPathDto, String> originalContentMultimediaValues = FlatHelper.filter(currentValues, currentTerm + "/original_content_multimedia", false);
    if (!originalContentMultimediaValues.isEmpty()) {
        rmObject.setOriginalContent(new DvMultimedia());
        DV_MULTIMEDIA_RM_UNMARSHALLER.handle(currentTerm + "/original_content_multimedia", (DvMultimedia) rmObject.getOriginalContent(), originalContentMultimediaValues, context, consumedPaths);
    }
    Map<FlatPathDto, String> originatingSystemAuditValues = FlatHelper.filter(currentValues, currentTerm + "/originating_system_audit", false);
    if (!originatingSystemAuditValues.isEmpty()) {
        rmObject.setOriginatingSystemAudit(new FeederAuditDetails());
        FEEDER_AUDIT_DETAILS_RM_UNMARSHALLER.handle(currentTerm + "/originating_system_audit", rmObject.getOriginatingSystemAudit(), currentValues, context, consumedPaths);
    }
    Map<Integer, Map<String, String>> feederSystemIds = extractMultiValued(currentTerm, "feeder_system_item_id", currentValues);
    rmObject.getFeederSystemItemIds().addAll(feederSystemIds.values().stream().map(DefaultValues::toDvIdentifier).collect(Collectors.toList()));
    consumeAllMatching(currentTerm + PATH_DIVIDER + "feeder_system_item_id", currentValues, consumedPaths, false);
    Map<Integer, Map<String, String>> originatingSystemIds = extractMultiValued(currentTerm, "originating_system_item_id", currentValues);
    rmObject.getOriginatingSystemItemIds().addAll(originatingSystemIds.values().stream().map(DefaultValues::toDvIdentifier).collect(Collectors.toList()));
    consumeAllMatching(currentTerm + PATH_DIVIDER + "originating_system_item_id", currentValues, consumedPaths, false);
}
Also used : FeederAuditDetails(com.nedap.archie.rm.archetyped.FeederAuditDetails) FlatPathDto(org.ehrbase.webtemplate.path.flat.FlatPathDto) DefaultValues(org.ehrbase.serialisation.walker.defaultvalues.DefaultValues) DvMultimedia(com.nedap.archie.rm.datavalues.encapsulated.DvMultimedia) DvParsable(com.nedap.archie.rm.datavalues.encapsulated.DvParsable) Map(java.util.Map)

Aggregations

DvMultimedia (com.nedap.archie.rm.datavalues.encapsulated.DvMultimedia)6 DvParsable (com.nedap.archie.rm.datavalues.encapsulated.DvParsable)2 FlatPathDto (org.ehrbase.webtemplate.path.flat.FlatPathDto)2 FeederAuditDetails (com.nedap.archie.rm.archetyped.FeederAuditDetails)1 CodePhrase (com.nedap.archie.rm.datatypes.CodePhrase)1 DvCodedText (com.nedap.archie.rm.datavalues.DvCodedText)1 DvEHRURI (com.nedap.archie.rm.datavalues.DvEHRURI)1 DvIdentifier (com.nedap.archie.rm.datavalues.DvIdentifier)1 DvText (com.nedap.archie.rm.datavalues.DvText)1 DvURI (com.nedap.archie.rm.datavalues.DvURI)1 DvDateTime (com.nedap.archie.rm.datavalues.quantity.datetime.DvDateTime)1 Attestation (com.nedap.archie.rm.generic.Attestation)1 AuditDetails (com.nedap.archie.rm.generic.AuditDetails)1 PartyProxy (com.nedap.archie.rm.generic.PartyProxy)1 TerminologyId (com.nedap.archie.rm.support.identification.TerminologyId)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1 MediendateiCluster (org.ehrbase.fhirbridge.ehr.opt.hipdocumentcomposition.definition.MediendateiCluster)1 DefaultValues (org.ehrbase.serialisation.walker.defaultvalues.DefaultValues)1 Attachment (org.hl7.fhir.r4.model.Attachment)1