Class CadfReason
- java.lang.Object
-
- org.linuxforhealth.fhir.audit.cadf.CadfReason
-
public final class CadfReason extends java.lang.ObjectOutcome 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(java.lang.String reasonType, java.lang.String reasonCode, java.lang.String policyType, java.lang.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()java.lang.StringgetPolicyId()java.lang.StringgetPolicyType()java.lang.StringgetReasonCode()java.lang.StringgetReasonType()CadfReasonvalidate()Validate contents of the Reason type.
-
-
-
Constructor Detail
-
CadfReason
public CadfReason(java.lang.String reasonType, java.lang.String reasonCode, java.lang.String policyType, java.lang.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 java.lang.String getReasonType()
-
getReasonCode
public java.lang.String getReasonCode()
-
getPolicyType
public java.lang.String getPolicyType()
-
getPolicyId
public java.lang.String getPolicyId()
-
validate
public CadfReason validate() throws java.lang.IllegalStateException
Validate contents of the Reason type. The logic is determined by the CADF specification.- Returns:
- This object for chaining.
- Throws:
java.lang.IllegalStateException- when the properties do not meet the specification.
-
builder
public static CadfReason.Builder builder()
-
-