Package com.ibm.fhir.audit.cadf
Class CadfReason
- java.lang.Object
-
- com.ibm.fhir.audit.cadf.CadfReason
-
public final class CadfReason extends Object
Outcome reason. Provides additional information to describe the event outcome
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCadfReason.BuilderBuilder is a convenience pattern to assemble to Java Objectstatic classCadfReason.ParserParserstatic classCadfReason.WriterGenerates JSON from this object.
-
Constructor Summary
Constructors Constructor Description CadfReason(String reasonType, String reasonCode, String policyType, String policyId)Create a CADF Reason object
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CadfReason.Builderbuilder()StringgetPolicyId()StringgetPolicyType()StringgetReasonCode()StringgetReasonType()CadfReasonvalidate()Validate contents of the Reason type.
-
-
-
Constructor Detail
-
CadfReason
public CadfReason(String reasonType, String reasonCode, String policyType, String policyId)
Create a CADF Reason object- Parameters:
reasonType- - String. The reason code domain URI. Must be present if reasonCode is present.reasonCode- - String. Detailed result code as described by the domain identifier (reason type). Must be specified if policyId is not specified.policyType- - String. The policy domain URI. Must be present if policyId is present.policyId- - String. An optional identifier that indicates which policy or algorithm was applied in order to achieve the described OUTCOME. Must be specified if reasonCode is not specified.
-
-
Method Detail
-
getReasonType
public String getReasonType()
-
getReasonCode
public String getReasonCode()
-
getPolicyType
public String getPolicyType()
-
getPolicyId
public String getPolicyId()
-
validate
public CadfReason validate() throws IllegalStateException
Validate contents of the Reason type. The logic is determined by the CADF specification.- Returns:
- This object for chaining.
- Throws:
IllegalStateException- when the properties do not meet the specification.
-
builder
public static CadfReason.Builder builder()
-
-