use of org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity in project nia-patient-switching-standard-adaptor by NHSDigital.
the class OperationOutcomeUtils method createOperationOutcome.
public static OperationOutcome createOperationOutcome(IssueType type, IssueSeverity severity, CodeableConcept details, String diagnostics) {
var operationOutcome = new OperationOutcome();
Meta meta = new Meta();
meta.setProfile(Collections.singletonList(new UriType(URI_TYPE)));
operationOutcome.setMeta(meta);
operationOutcome.addIssue().setCode(type).setSeverity(severity).setDetails(details).setDiagnostics(diagnostics);
return operationOutcome;
}
Aggregations