protected AuditEvent.AuditEventOutcome getAuditEventOutcome(EventOutcomeIndicator eventOutcomeIndicator) { try { return AuditEvent.AuditEventOutcome.fromCode(String.valueOf(eventOutcomeIndicator.getValue())); } catch (FHIRException e) { // should never happen throw new AuditException(e); } }
protected AuditEvent.AuditEventOutcome getAuditEventOutcome(EventOutcomeIndicator eventOutcomeIndicator) { try { return AuditEvent.AuditEventOutcome.fromCode(String.valueOf(eventOutcomeIndicator.getValue())); } catch (FHIRException e) { // should never happen throw new AuditException(e); } }
protected Element eventIdentification(EventIdentificationType eventIdentification) { Element element = new Element("EventIdentification"); if (eventIdentification != null) { element.setAttribute("EventActionCode", eventIdentification.getEventActionCode().getValue()); element.setAttribute("EventDateTime", eventIdentification.getEventDateTime().toString()); element.setAttribute("EventOutcomeIndicator", eventIdentification.getEventOutcomeIndicator().getValue().toString()); if (eventIdentification.getEventID() != null) { element.addContent(codedValueType("EventID", eventIdentification.getEventID())); } eventIdentification.getEventTypeCode().stream() .map(eventTypeCode -> codedValueType("EventTypeCode", eventTypeCode)) .forEach(element::addContent); if (eventIdentification.getEventOutcomeDescription() != null) { element.addContent( new Element("EventOutcomeDescription") .addContent(eventIdentification.getEventOutcomeDescription())); } eventIdentification.getPurposesOfUse().stream() .map(purposeOfUse -> codedValueType("PurposeOfUse", purposeOfUse)) .forEach(element::addContent); } return element; }