Summary Table

Categories Total Count
PII 0
URL 0
DNS 0
EKL 0
IP 0
PORT 0
VsID 0
CF 0
AI 0
VPD 0
PL 0
Other 0

File Content

package gov.va.med.ewv.model.response;

import gov.va.med.ewv.util.AdjustmentType;

public abstract class Adjustment implements Comparable<Adjustment>
{

public abstract String getDescriptionLong();
public abstract void setDescriptionLong(String descriptionLong);

public abstract String getDescriptionShort();
public abstract void setDescriptionShort(String descriptionShort);

public abstract String getReasonCode();
public abstract void setReasonCode(String reasonCode);

public abstract String getQuantity();
public abstract void setQuantity(String quantity);

public abstract String getCoAmount();
public abstract String getCrAmount();
public abstract String getOaAmount();
public abstract String getPiAmount();
public abstract String getPrAmount();

public abstract String getAdjCodeGroupDescription();
public abstract void setAdjCodeGroupDescription(String adjCodeGroupDescription);

public abstract AdjustmentType getAdjustmentType();
public abstract void setAdjustmentType(AdjustmentType adjustmentType);


// With AdjustmentType.compare no longer static we could do this:
public int compareTo(Adjustment bean)
{
return getAdjustmentType().compareTo(bean.getAdjustmentType());
}
/*
* However, the whole concept of comparing Adjustment just on the getAdjustmentType
* seem wrong. Besides, this compareTo is never (explicitly) called.
* Although I guess a Collection.sort() or map could be using the implicit value.
*
* Without this implementation I see:
* The type ClaimOhiAdjustment must implement the inherited abstract method Comparable<Adjustment>.compareTo(Adjustment)
* The type ServiceLineOhiAdjustment must implement the inherited abstract method Comparable<Adjustment>.compareTo(Adjustment)
*
*/

// Phase Two Stuff
public String getAdjustmentAmount() {
String returnValue;
AdjustmentType adjType = getAdjustmentType();
if (adjType != null) {
switch (adjType) {
case CO : returnValue = getCoAmount(); break;
case CR : returnValue = getCrAmount(); break;
case OA : returnValue = getOaAmount(); break;
case PI : returnValue = getPiAmount(); break;
case PR : returnValue = getPrAmount(); break;
default : returnValue = "";
}
} else {
returnValue = "";
}
return returnValue;
}

public String getAdjustmentCode() {
StringBuilder sb = new StringBuilder();

// Put on the type
AdjustmentType adjustmentType = getAdjustmentType();
if (adjustmentType != null) {
sb.append(adjustmentType.toString());
}

// Put on the reason
sb.append(getReasonCode());

return sb.toString();
}
}