use of org.ehrbase.serialisation.dbencoding.SimpleClassName in project openEHR_SDK by ehrbase.
the class IsmTransitionAttributes method toMap.
/**
* encode the attributes lower snake case to comply with UML conventions and make is queryable
* @return
*/
public Map<String, Object> toMap() {
Map<String, Object> valuemap = PathMap.getInstance();
if (ismTransition == null)
return null;
if (ismTransition.getReason() != null) {
List<Map<String, Object>> reasons = new ArrayList<>();
for (DvText reason : ismTransition.getReason()) {
valuemap.put(TAG_CLASS, new SimpleClassName(reason).toString());
valuemap.put("value", reason.getValue());
reasons.add(valuemap);
}
valuemap.put("reason", reasons);
}
if (ismTransition.getCareflowStep() != null) {
valuemap.put("careflow_step", ismTransition.getCareflowStep());
}
if (ismTransition.getCurrentState() != null) {
valuemap.put("current_state", ismTransition.getCurrentState());
}
if (ismTransition.getTransition() != null) {
valuemap.put("transition", ismTransition.getTransition());
}
return valuemap;
}
use of org.ehrbase.serialisation.dbencoding.SimpleClassName in project openEHR_SDK by ehrbase.
the class FeederAuditAttributes method toMap.
/**
* encode the attributes lower snake case to comply with UML conventions and make is queryable
* @return
*/
public Map<String, Object> toMap() {
Map<String, Object> valuemap = PathMap.getInstance();
valuemap.put(TAG_CLASS, new SimpleClassName(feederAudit).toString());
if (feederAudit.getOriginatingSystemItemIds() != null && !feederAudit.getOriginatingSystemItemIds().isEmpty()) {
valuemap.put("originating_system_item_ids", encodeDvIdentifiers(feederAudit.getOriginatingSystemItemIds()));
}
valuemap.put("feeder_system_audit", new FeederAuditDetailsAttributes(feederAudit.getFeederSystemAudit()).toMap());
if (feederAudit.getFeederSystemItemIds() != null && !feederAudit.getFeederSystemItemIds().isEmpty()) {
valuemap.put("feeder_system_item_ids", encodeDvIdentifiers(feederAudit.getFeederSystemItemIds()));
}
if (feederAudit.getOriginalContent() != null)
valuemap.put("original_content", new RmObjectEncoding(feederAudit.getOriginalContent()).toMap());
valuemap.put("originating_system_audit", new FeederAuditDetailsAttributes(feederAudit.getOriginatingSystemAudit()).toMap());
return valuemap;
}
use of org.ehrbase.serialisation.dbencoding.SimpleClassName in project openEHR_SDK by ehrbase.
the class LinksAttributes method toMap.
public List<Map<String, Object>> toMap() {
List<Map<String, Object>> links = new ArrayList<>();
for (Link link : linkList) {
Map<String, Object> valuemap = PathMap.getInstance();
valuemap.put(TAG_CLASS, new SimpleClassName(link).toString());
valuemap.put("meaning", link.getMeaning());
valuemap.put("type", link.getType());
valuemap.put("target", link.getTarget());
links.add(valuemap);
}
return links;
}
use of org.ehrbase.serialisation.dbencoding.SimpleClassName in project openEHR_SDK by ehrbase.
the class OtherParticipationAttributes method toMap.
public List<Map<String, Object>> toMap() {
List<Map<String, Object>> participations = new ArrayList<>();
for (Participation participation : participationList) {
Map<String, Object> valuemap = PathMap.getInstance();
valuemap.put(TAG_CLASS, new SimpleClassName(participation).toString());
valuemap.put("function", participation.getFunction());
valuemap.put("mode", participation.getMode());
valuemap.put("time", participation.getTime());
valuemap.put("performer", new SubjectAttributes(participation.getPerformer(), compositionSerializer).toMap());
participations.add(valuemap);
}
return participations;
}
Aggregations