com.mmm.cms.homehealth
Class AbstractIcd9Code

java.lang.Object
  extended by com.mmm.cms.homehealth.AbstractIcd9Code
All Implemented Interfaces:
Icd9CodeIF, Describable
Direct Known Subclasses:
DiagnosisCode

public abstract class AbstractIcd9Code
extends java.lang.Object
implements Icd9CodeIF

Provides the base information about a Diagnosis or Procedure code, including the code value, type, and assocaited category.


Field Summary
static java.lang.String BLANK_CODE
          Full length blank code value
static java.lang.String EMPTY_CODE
          an Empty string of length 0
 
Fields inherited from interface com.mmm.cms.homehealth.proto.Icd9CodeIF
TYPE_ICD_9_CM_DIAGNOSIS
 
Constructor Summary
AbstractIcd9Code()
          Constructs the code with an empty code value
AbstractIcd9Code(java.lang.String code, int codeType)
          This method will bypass the code and type validation, assuming that the extended class knows what type it is.
AbstractIcd9Code(java.lang.String code, int codeType, boolean validCode, boolean validForScoring)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compares this code's value with another code's value
 java.lang.String getCode()
          Get the value of code
 int getCodeType()
          gets the code type
 java.lang.String getDescription()
          Get the value of description
 DiagnosticCategoryIF getDiagnosticGroup()
          Get the value of diagnosticGroup
 HomeHealthGrouperIF getGrouper()
          Get the value of grouper
 int hashCode()
          hash code based on the code's value
 boolean isBlank()
          determines if the code is blank
 boolean isECode()
          determines if the code is an E-code
 boolean isOptionalVCode()
          determines if the code is an optional V-code
 boolean isValidCode()
          Get the value of validCode
 boolean isValidForScoring()
          Get the value of validForScoring
 boolean isVCode()
          determine if the code is a V-code
 void setCode(java.lang.String code)
          Set the value of code
 void setCodeType(int type)
          Sets the code type - must be either 1 for diagnosis or 2 for procedure
 void setDescription(java.lang.String description)
          Set the value of description
 void setDiagnosticGroup(DiagnosticCategoryIF diagnosticGroup)
          Set the value of diagnosticGroup
 void setGrouper(HomeHealthGrouperIF grouper)
          Set the value of grouper
 void setOptionalVCode(boolean bool)
          Sets the optional V-Code flag
 void setValidCode(boolean validCode)
          Set the value of validCode
 void setValidForScoring(boolean validForScoring)
          Set the value of validForScoring
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

BLANK_CODE

public static final java.lang.String BLANK_CODE
Full length blank code value

See Also:
Constant Field Values

EMPTY_CODE

public static final java.lang.String EMPTY_CODE
an Empty string of length 0

See Also:
Constant Field Values
Constructor Detail

AbstractIcd9Code

public AbstractIcd9Code()
Constructs the code with an empty code value


AbstractIcd9Code

public AbstractIcd9Code(java.lang.String code,
                        int codeType)
This method will bypass the code and type validation, assuming that the extended class knows what type it is.

Parameters:
code -
codeType -

AbstractIcd9Code

public AbstractIcd9Code(java.lang.String code,
                        int codeType,
                        boolean validCode,
                        boolean validForScoring)
Parameters:
code -
codeType -
validCode -
validForScoring -
Method Detail

hashCode

public int hashCode()
hash code based on the code's value

Overrides:
hashCode in class java.lang.Object
Returns:

equals

public boolean equals(java.lang.Object obj)
Compares this code's value with another code's value

Overrides:
equals in class java.lang.Object
Parameters:
obj -
Returns:
true if the values are the same

getDescription

public java.lang.String getDescription()
Get the value of description

Specified by:
getDescription in interface Describable
Returns:
the value of description

setDescription

public void setDescription(java.lang.String description)
Set the value of description

Specified by:
setDescription in interface Describable
Parameters:
description - new value of description

getCode

public java.lang.String getCode()
Get the value of code

Specified by:
getCode in interface Icd9CodeIF
Returns:
the value of code

setCode

public void setCode(java.lang.String code)
Set the value of code

Specified by:
setCode in interface Icd9CodeIF
Parameters:
code - new value of code

setCodeType

public void setCodeType(int type)
Description copied from interface: Icd9CodeIF
Sets the code type - must be either 1 for diagnosis or 2 for procedure

Specified by:
setCodeType in interface Icd9CodeIF
Parameters:
type - valid code type

getCodeType

public int getCodeType()
gets the code type

Specified by:
getCodeType in interface Icd9CodeIF
Returns:
the code type

getDiagnosticGroup

public DiagnosticCategoryIF getDiagnosticGroup()
Get the value of diagnosticGroup

Specified by:
getDiagnosticGroup in interface Icd9CodeIF
Returns:
the value of diagnosticGroup

setDiagnosticGroup

public void setDiagnosticGroup(DiagnosticCategoryIF diagnosticGroup)
Set the value of diagnosticGroup

Specified by:
setDiagnosticGroup in interface Icd9CodeIF
Parameters:
diagnosticGroup - new value of diagnosticGroup

isECode

public boolean isECode()
determines if the code is an E-code

Specified by:
isECode in interface Icd9CodeIF
Returns:
true if the first character in the code value is 'E'

isVCode

public boolean isVCode()
determine if the code is a V-code

Specified by:
isVCode in interface Icd9CodeIF
Returns:
true if the first character in the code value is 'V'

getGrouper

public HomeHealthGrouperIF getGrouper()
Get the value of grouper

Returns:
the value of grouper

setGrouper

public void setGrouper(HomeHealthGrouperIF grouper)
Set the value of grouper

Parameters:
grouper - new value of grouper

isValidForScoring

public boolean isValidForScoring()
Get the value of validForScoring

Specified by:
isValidForScoring in interface Icd9CodeIF
Returns:
the value of validForScoring

setValidForScoring

public void setValidForScoring(boolean validForScoring)
Set the value of validForScoring

Specified by:
setValidForScoring in interface Icd9CodeIF
Parameters:
validForScoring - new value of validForScoring

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:

isBlank

public boolean isBlank()
determines if the code is blank

Specified by:
isBlank in interface Icd9CodeIF
Returns:
true if the code includes only spaces

isValidCode

public boolean isValidCode()
Get the value of validCode

Specified by:
isValidCode in interface Icd9CodeIF
Returns:
the value of validCode

setValidCode

public void setValidCode(boolean validCode)
Set the value of validCode

Specified by:
setValidCode in interface Icd9CodeIF
Parameters:
validCode - new value of validCode

isOptionalVCode

public boolean isOptionalVCode()
determines if the code is an optional V-code

Specified by:
isOptionalVCode in interface Icd9CodeIF
Returns:
true if this code is set to be an optional V-Code

setOptionalVCode

public void setOptionalVCode(boolean bool)
Sets the optional V-Code flag

Parameters:
bool -