Package ca.uhn.fhir.util
Class OperationOutcomeUtil
java.lang.Object
ca.uhn.fhir.util.OperationOutcomeUtil
Utilities for dealing with OperationOutcome resources across various model versions
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addDetailsToIssue
(FhirContext theFhirContext, IBase theIssue, String theSystem, String theCode) static IBase
addIssue
(FhirContext theCtx, IBaseOperationOutcome theOperationOutcome, String theSeverity, String theDetails, String theLocation, String theCode) Add an issue to an OperationOutcomestatic IBase
addIssue
(FhirContext theCtx, IBaseOperationOutcome theOperationOutcome, String theSeverity, String theDetails, String theLocation, String theCode, String theDetailSystem, String theDetailCode, String theDetailDescription) static void
addIssueColExtensionToIssue
(FhirContext theCtx, IBase theIssue, String theColumn) static void
addIssueLineExtensionToIssue
(FhirContext theCtx, IBase theIssue, String theLine) static IBase
addIssueWithMessageId
(FhirContext myCtx, IBaseOperationOutcome theOperationOutcome, String theSeverity, String theMessage, String theMessageId, String theLocation, String theCode) static void
addLocationToIssue
(FhirContext theContext, IBase theIssue, String theLocation) static void
addMessageIdExtensionToIssue
(FhirContext theCtx, IBase theIssue, String theMessageId) static String
getFirstIssueDetails
(FhirContext theCtx, IBaseOperationOutcome theOutcome) static String
getFirstIssueLocation
(FhirContext theCtx, IBaseOperationOutcome theOutcome) static int
getIssueCount
(FhirContext theCtx, IBaseOperationOutcome theOutcome) static boolean
hasIssues
(FhirContext theCtx, IBaseOperationOutcome theOutcome) Returns true if the given OperationOutcome has 1 or more Operation.issue repetitionsstatic boolean
hasIssuesOfSeverity
(FhirContext theCtx, IBaseOperationOutcome theOutcome, String theSeverity) static IBaseOperationOutcome
newInstance
(FhirContext theCtx)
-
Constructor Details
-
OperationOutcomeUtil
public OperationOutcomeUtil()
-
-
Method Details
-
addIssue
public static IBase addIssue(FhirContext theCtx, IBaseOperationOutcome theOperationOutcome, String theSeverity, String theDetails, String theLocation, String theCode) Add an issue to an OperationOutcome- Parameters:
theCtx
- The fhir contexttheOperationOutcome
- The OO resource to add totheSeverity
- The severity (fatal | error | warning | information)theDetails
- The details stringtheCode
-- Returns:
- Returns the newly added issue
-
addIssue
-
getFirstIssueDetails
-
getFirstIssueLocation
-
hasIssues
Returns true if the given OperationOutcome has 1 or more Operation.issue repetitions -
getIssueCount
-
hasIssuesOfSeverity
public static boolean hasIssuesOfSeverity(FhirContext theCtx, IBaseOperationOutcome theOutcome, String theSeverity) -
newInstance
-
addLocationToIssue
-
addIssueWithMessageId
public static IBase addIssueWithMessageId(FhirContext myCtx, IBaseOperationOutcome theOperationOutcome, String theSeverity, String theMessage, String theMessageId, String theLocation, String theCode) -
addDetailsToIssue
public static void addDetailsToIssue(FhirContext theFhirContext, IBase theIssue, String theSystem, String theCode) -
addIssueLineExtensionToIssue
-
addIssueColExtensionToIssue
public static void addIssueColExtensionToIssue(FhirContext theCtx, IBase theIssue, String theColumn) -
addMessageIdExtensionToIssue
public static void addMessageIdExtensionToIssue(FhirContext theCtx, IBase theIssue, String theMessageId)
-