Class CadfReason
- java.lang.Object
-
- org.linuxforhealth.fhir.audit.cadf.CadfReason
-
public final class CadfReason extends java.lang.Object
Outcome reason. Provides additional information to describe the event outcome
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CadfReason.Builder
Builder is a convenience pattern to assemble to Java Objectstatic class
CadfReason.Parser
Parserstatic class
CadfReason.Writer
Generates 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.Builder
builder()
java.lang.String
getPolicyId()
java.lang.String
getPolicyType()
java.lang.String
getReasonCode()
java.lang.String
getReasonType()
CadfReason
validate()
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()
-
-