use of org.hl7.fhir.r4.model.MessageHeader in project integration-adaptor-111 by nhsconnect.
the class MessageHeaderService method createMessageHeader.
public MessageHeader createMessageHeader(ItkReportHeader itkHeader, String messageId, String effectiveTime) {
MessageHeader header = new MessageHeader();
header.setIdElement(new IdType(messageId));
header.setEvent(getEvent(itkHeader.getSpecVal()));
header.setSource(getSource());
header.setTimestampElement(DateUtil.parseToInstantType(effectiveTime));
header.setReason(new CodeableConcept().addCoding(new Coding().setCode(itkHeader.getSpecVal()).setSystem(itkHeader.getSpecKey())));
header.setDestination(itkHeader.getAddressList().stream().map(it -> new MessageDestinationComponent().setEndpoint(it)).collect(toList()));
return header;
}
use of org.hl7.fhir.r4.model.MessageHeader in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeMessageHeaderMessageSourceComponent.
protected void composeMessageHeaderMessageSourceComponent(Complex parent, String parentType, String name, MessageHeader.MessageSourceComponent element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeBackboneElement(t, "source", name, element, index);
if (element.hasNameElement())
composeString(t, "MessageHeader", "name", element.getNameElement(), -1);
if (element.hasSoftwareElement())
composeString(t, "MessageHeader", "software", element.getSoftwareElement(), -1);
if (element.hasVersionElement())
composeString(t, "MessageHeader", "version", element.getVersionElement(), -1);
if (element.hasContact())
composeContactPoint(t, "MessageHeader", "contact", element.getContact(), -1);
if (element.hasEndpointElement())
composeUri(t, "MessageHeader", "endpoint", element.getEndpointElement(), -1);
}
use of org.hl7.fhir.r4.model.MessageHeader in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeMessageHeaderMessageDestinationComponent.
protected void composeMessageHeaderMessageDestinationComponent(Complex parent, String parentType, String name, MessageHeader.MessageDestinationComponent element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeBackboneElement(t, "destination", name, element, index);
if (element.hasNameElement())
composeString(t, "MessageHeader", "name", element.getNameElement(), -1);
if (element.hasTarget())
composeReference(t, "MessageHeader", "target", element.getTarget(), -1);
if (element.hasEndpointElement())
composeUri(t, "MessageHeader", "endpoint", element.getEndpointElement(), -1);
}
use of org.hl7.fhir.r4.model.MessageHeader in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeMessageHeaderMessageDestinationComponent.
protected void composeMessageHeaderMessageDestinationComponent(Complex parent, String parentType, String name, MessageHeader.MessageDestinationComponent element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeBackboneElement(t, "destination", name, element, index);
if (element.hasNameElement())
composeString(t, "MessageHeader", "name", element.getNameElement(), -1);
if (element.hasTarget())
composeReference(t, "MessageHeader", "target", element.getTarget(), -1);
if (element.hasEndpointElement())
composeUri(t, "MessageHeader", "endpoint", element.getEndpointElement(), -1);
}
use of org.hl7.fhir.r4.model.MessageHeader in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeMessageHeaderMessageDestinationComponent.
protected void composeMessageHeaderMessageDestinationComponent(Complex parent, String parentType, String name, MessageHeader.MessageDestinationComponent element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeBackboneElement(t, "destination", name, element, index);
if (element.hasNameElement())
composeString(t, "MessageHeader", "name", element.getNameElement(), -1);
if (element.hasTarget())
composeReference(t, "MessageHeader", "target", element.getTarget(), -1);
if (element.hasEndpointElement())
composeUrl(t, "MessageHeader", "endpoint", element.getEndpointElement(), -1);
if (element.hasReceiver())
composeReference(t, "MessageHeader", "receiver", element.getReceiver(), -1);
}
Aggregations