oo.addIssue().setSeverity(IssueSeverityEnum.ERROR).setDiagnostics(caughtEx.getMessage()); nextEntry.setResource(oo);
/** * @deprecated Use {@link #getDiagnosticsElement()} instead - OperationOutcome.details was renamed to OperationOutcome.diagnostics in DSTU2 and a new OperationOutcome.details codeableconcept element was introduced */ @Deprecated @Override public StringDt getDetailsElement() { return getDiagnosticsElement(); }
/** * Adds and returns a new value for <b>issue</b> () * * <p> * <b>Definition:</b> * An error, warning or information message that results from a system action * </p> */ public Issue addIssue() { Issue newType = new Issue(); getIssue().add(newType); return newType; }
oo.addIssue().setSeverity(IssueSeverityEnum.ERROR).setDiagnostics(caughtEx.getMessage()); nextEntry.setResource(oo);
oo.addIssue().setSeverity(IssueSeverityEnum.INFORMATION).setDiagnostics("Ok to delete"); return new MethodOutcome(new IdDt(theId.getValue()), oo);
/** * Gets the first repetition for <b>location</b> (), * creating it if it does not already exist. * * <p> * <b>Definition:</b> * A simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised. * </p> */ public StringDt getLocationFirstRep() { if (getLocation().isEmpty()) { return addLocation(); } return getLocation().get(0); } /**
/** * Sets the value(s) for <b>severity</b> () * * <p> * <b>Definition:</b> * Indicates whether the issue indicates a variation from successful processing * </p> */ public Issue setSeverity(IssueSeverityEnum theValue) { setSeverity(new BoundCodeDt<IssueSeverityEnum>(IssueSeverityEnum.VALUESET_BINDER, theValue)); /* getSeverityElement().setValueAsEnum(theValue); */ return this; }
/** * Adds a given new value for <b>location</b> () * * <p> * <b>Definition:</b> * A simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised. * </p> * @param theValue The location to add (must not be <code>null</code>) */ public Issue addLocation(StringDt theValue) { if (theValue == null) { throw new NullPointerException("theValue must not be null"); } getLocation().add(theValue); return this; }
/** * Adds and returns a new value for <b>location</b> () * * <p> * <b>Definition:</b> * A simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised. * </p> */ public StringDt addLocation() { StringDt newType = new StringDt(); getLocation().add(newType); return newType; }
/** * Gets the value(s) for <b>diagnostics</b> (). * creating it if it does * not exist. This method may return <code>null</code>. * * <p> * <b>Definition:</b> * Additional diagnostic information about the issue. Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue. * </p> */ public String getDiagnostics() { return getDiagnosticsElement().getValue(); }
/** * Gets the value(s) for <b>code</b> (). * creating it if it does * not exist. This method may return <code>null</code>. * * <p> * <b>Definition:</b> * Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element * </p> */ public String getCode() { return getCodeElement().getValue(); }
/** * Gets the value(s) for <b>severity</b> (). * creating it if it does * not exist. This method may return <code>null</code>. * * <p> * <b>Definition:</b> * Indicates whether the issue indicates a variation from successful processing * </p> */ public String getSeverity() { return getSeverityElement().getValue(); }
/** * @deprecated Use {@link #setDetails(String)} instead - OperationOutcome.details was renamed to OperationOutcome.diagnostics in DSTU2 and a new OperationOutcome.details codeableconcept element was introduced */ @Deprecated @Override public BaseIssue setDetails(String theString) { setDiagnostics(theString); return this; }
@Override protected IBaseOperationOutcome createOperationOutcome(String theSeverity, String theMessage, String theCode) { OperationOutcome oo = new OperationOutcome(); oo.getIssueFirstRep().getSeverityElement().setValue(theSeverity); oo.getIssueFirstRep().getDiagnosticsElement().setValue(theMessage); oo.getIssueFirstRep().getCodeElement().setValue(theCode); return oo; }
if (nextIssue.getSeverityElement().getValueAsEnum().ordinal() >= IssueSeverityEnum.ERROR.ordinal()) { System.out.println("We failed validation!"); System.out.println(outcome.getIssueFirstRep().getDetailsElement().getValue());
oo.addIssue().setSeverity(IssueSeverityEnum.INFORMATION).setDiagnostics("Ok to delete"); return new MethodOutcome(new IdDt(theId.getValue()), oo);
@Read public Patient read(@IdParam IdDt theId) { if (databaseIsDown) { OperationOutcome oo = new OperationOutcome(); oo.addIssue().setSeverity(IssueSeverityEnum.FATAL).setDetails("Database is down"); throw new InternalErrorException("Database is down", oo); } Patient patient = new Patient(); // populate this return patient; } //END SNIPPET: returnOO
@Override protected IBaseOperationOutcome createOperationOutcome(String theSeverity, String theMessage, String theCode) { OperationOutcome oo = new OperationOutcome(); oo.getIssueFirstRep().getSeverityElement().setValue(theSeverity); oo.getIssueFirstRep().getDiagnosticsElement().setValue(theMessage); oo.getIssueFirstRep().getCodeElement().setValue(theCode); return oo; }