use of org.hl7.fhir.r4.model.MessageHeader in project integration-adaptor-111 by nhsconnect.
the class EncounterReportBundleService method addMessageHeader.
private void addMessageHeader(Bundle bundle, MessageHeader messageHeader) {
Bundle.BundleEntryResponseComponent responseComponent = new Bundle.BundleEntryResponseComponent().setStatus("success").setLastModifiedElement(new InstantType(new Date(), MILLI, getTimeZone(UTC)));
bundle.addEntry().setFullUrl(createFullUrl(messageHeader)).setResource(messageHeader).setResponse(responseComponent);
}
use of org.hl7.fhir.r4.model.MessageHeader in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeMessageHeader.
protected void composeMessageHeader(Complex parent, String parentType, String name, MessageHeader element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeDomainResource(t, "MessageHeader", name, element, index);
if (element.hasEvent())
composeCoding(t, "MessageHeader", "event", element.getEvent(), -1);
for (int i = 0; i < element.getDestination().size(); i++) composeMessageHeaderMessageDestinationComponent(t, "MessageHeader", "destination", element.getDestination().get(i), i);
if (element.hasReceiver())
composeReference(t, "MessageHeader", "receiver", element.getReceiver(), -1);
if (element.hasSender())
composeReference(t, "MessageHeader", "sender", element.getSender(), -1);
if (element.hasTimestampElement())
composeInstant(t, "MessageHeader", "timestamp", element.getTimestampElement(), -1);
if (element.hasEnterer())
composeReference(t, "MessageHeader", "enterer", element.getEnterer(), -1);
if (element.hasAuthor())
composeReference(t, "MessageHeader", "author", element.getAuthor(), -1);
if (element.hasSource())
composeMessageHeaderMessageSourceComponent(t, "MessageHeader", "source", element.getSource(), -1);
if (element.hasResponsible())
composeReference(t, "MessageHeader", "responsible", element.getResponsible(), -1);
if (element.hasReason())
composeCodeableConcept(t, "MessageHeader", "reason", element.getReason(), -1);
if (element.hasResponse())
composeMessageHeaderMessageHeaderResponseComponent(t, "MessageHeader", "response", element.getResponse(), -1);
for (int i = 0; i < element.getFocus().size(); i++) composeReference(t, "MessageHeader", "focus", element.getFocus().get(i), i);
}
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 composeMessageHeaderMessageHeaderResponseComponent.
protected void composeMessageHeaderMessageHeaderResponseComponent(Complex parent, String parentType, String name, MessageHeader.MessageHeaderResponseComponent element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeBackboneElement(t, "response", name, element, index);
if (element.hasIdentifierElement())
composeId(t, "MessageHeader", "identifier", element.getIdentifierElement(), -1);
if (element.hasCodeElement())
composeEnum(t, "MessageHeader", "code", element.getCodeElement(), -1);
if (element.hasDetails())
composeReference(t, "MessageHeader", "details", element.getDetails(), -1);
}
use of org.hl7.fhir.r4.model.MessageHeader in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeMessageHeader.
protected void composeMessageHeader(Complex parent, String parentType, String name, MessageHeader element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeDomainResource(t, "MessageHeader", name, element, index);
if (element.hasTimestampElement())
composeInstant(t, "MessageHeader", "timestamp", element.getTimestampElement(), -1);
if (element.hasEvent())
composeCoding(t, "MessageHeader", "event", element.getEvent(), -1);
if (element.hasResponse())
composeMessageHeaderMessageHeaderResponseComponent(t, "MessageHeader", "response", element.getResponse(), -1);
if (element.hasSource())
composeMessageHeaderMessageSourceComponent(t, "MessageHeader", "source", element.getSource(), -1);
for (int i = 0; i < element.getDestination().size(); i++) composeMessageHeaderMessageDestinationComponent(t, "MessageHeader", "destination", element.getDestination().get(i), i);
if (element.hasEnterer())
composeReference(t, "MessageHeader", "enterer", element.getEnterer(), -1);
if (element.hasAuthor())
composeReference(t, "MessageHeader", "author", element.getAuthor(), -1);
if (element.hasReceiver())
composeReference(t, "MessageHeader", "receiver", element.getReceiver(), -1);
if (element.hasResponsible())
composeReference(t, "MessageHeader", "responsible", element.getResponsible(), -1);
if (element.hasReason())
composeCodeableConcept(t, "MessageHeader", "reason", element.getReason(), -1);
for (int i = 0; i < element.getData().size(); i++) composeReference(t, "MessageHeader", "data", element.getData().get(i), i);
}
Aggregations