com.mmm.cms.homehealth
Class TreatmentAuthorization

java.lang.Object
  extended by com.mmm.cms.homehealth.TreatmentAuthorization
All Implemented Interfaces:
TreatmentAuthorizationIF

public class TreatmentAuthorization
extends java.lang.Object
implements TreatmentAuthorizationIF

This holds the parts of the OASIS Treatment Authorization code and the getAuthorizationCode() converts those parts into the 18 character string for the Authorization output.


Field Summary
static HexavigesimalCalendarFormat calFormat
          Hexavigesimal Calendar Formatter
static HexavigesimalFormat hexaFormat
          Hexavigesimal Formatter for numbers
static IntegerFormat iformat
          Integer formatter for consistant 2 digits
 
Fields inherited from interface com.mmm.cms.homehealth.proto.TreatmentAuthorizationIF
DEFAULT_BLANK_VALUE, EPISODE_TIMIMG_EARLY, EPISODE_TIMIMG_LATE, EPISODE_TIMIMG_UNKNOWN
 
Constructor Summary
TreatmentAuthorization(HomeHealthRecordIF record, HomeHealthRecordValidatorIF validator, PointsScoringEquationsIF clinScore, PointsScoringEquationsIF funcScore)
          Constructor that sets up the episode timing and dates prior to creating the code
 
Method Summary
 int getASSMT_REASON()
          gets the assessment reason
 java.lang.String getAuthorizationCode()
          Creates a authorization code base on the following: 1.
 java.lang.String[] getAuthorizationCodeParts()
          gets the authorization code split into an array of Strings for its individual pieces
 PointsScoringEquationsIF getClinicalScore()
          gets the ClinicalScore
 int getClinicalScoreCount()
          gets the Clinical Score number of equation
 int getClinicalScoreValue(int equationNumber)
          gets the Clinical score of a specific equation
 int getEPISODE_TIMING()
          gets the M0110_EPISODE_TIMING
 PointsScoringEquationsIF getFunctionalScore()
          gets the FunctionalScore
 int getFunctionalScoreCount()
          gets the Functional Score number of equation
 int getFunctionalScoreValue(int equationNumber)
          gets the Functional score of a specific equation
 java.util.Calendar getINFO_COMPLETED_YR34()
          gets the M0090_INFO_COMPLETED_YR34
protected  int getScoreValue(PointsScoringEquationsIF score, int equationNumber)
          Generic method for retrieving the equation score for a supplied equation.
 java.util.Calendar getSTART_CARE_YR34()
          gets the M0030_START_CARE_YR34
 void setASSMT_REASON(int M0100_ASSMT_REASON2)
          Sets the assessment reason
 void setClinicalScore(PointsScoringEquationsIF clinicalScore)
          Sets the clinical scoring values
 void setEPISODE_TIMING(int M0110_EPISODE_TIMING)
          Sets the episode timing
 void setFunctionalScore(PointsScoringEquationsIF functionalScore)
          Sets the functional scoring values
 void setINFO_COMPLETED_YR34(java.util.Calendar M0090_INFO_COMPLETED_YR34)
          Sets the completed date
 void setSTART_CARE_YR34(java.util.Calendar M0030_START_CARE_YR34)
          Sets the start date
 java.lang.String toString()
          Same as getAuthorizationCode()
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

iformat

public static final IntegerFormat iformat
Integer formatter for consistant 2 digits


calFormat

public static final HexavigesimalCalendarFormat calFormat
Hexavigesimal Calendar Formatter


hexaFormat

public static final HexavigesimalFormat hexaFormat
Hexavigesimal Formatter for numbers

Constructor Detail

TreatmentAuthorization

public TreatmentAuthorization(HomeHealthRecordIF record,
                              HomeHealthRecordValidatorIF validator,
                              PointsScoringEquationsIF clinScore,
                              PointsScoringEquationsIF funcScore)
Constructor that sets up the episode timing and dates prior to creating the code

Parameters:
record -
validator -
clinScore -
funcScore -
Method Detail

getASSMT_REASON

public int getASSMT_REASON()
gets the assessment reason

Specified by:
getASSMT_REASON in interface TreatmentAuthorizationIF
Returns:
the assessment reason value

setASSMT_REASON

public void setASSMT_REASON(int M0100_ASSMT_REASON2)
Sets the assessment reason

Specified by:
setASSMT_REASON in interface TreatmentAuthorizationIF
Parameters:
M0100_ASSMT_REASON2 -

getSTART_CARE_YR34

public java.util.Calendar getSTART_CARE_YR34()
gets the M0030_START_CARE_YR34

Specified by:
getSTART_CARE_YR34 in interface TreatmentAuthorizationIF
Returns:
the start date

setSTART_CARE_YR34

public void setSTART_CARE_YR34(java.util.Calendar M0030_START_CARE_YR34)
Sets the start date

Specified by:
setSTART_CARE_YR34 in interface TreatmentAuthorizationIF
Parameters:
M0030_START_CARE_YR34 -

getINFO_COMPLETED_YR34

public java.util.Calendar getINFO_COMPLETED_YR34()
gets the M0090_INFO_COMPLETED_YR34

Specified by:
getINFO_COMPLETED_YR34 in interface TreatmentAuthorizationIF
Returns:
the completed date

setINFO_COMPLETED_YR34

public void setINFO_COMPLETED_YR34(java.util.Calendar M0090_INFO_COMPLETED_YR34)
Sets the completed date

Specified by:
setINFO_COMPLETED_YR34 in interface TreatmentAuthorizationIF
Parameters:
M0090_INFO_COMPLETED_YR34 -

getEPISODE_TIMING

public int getEPISODE_TIMING()
gets the M0110_EPISODE_TIMING

Specified by:
getEPISODE_TIMING in interface TreatmentAuthorizationIF
Returns:
the episode timing

setEPISODE_TIMING

public void setEPISODE_TIMING(int M0110_EPISODE_TIMING)
Sets the episode timing

Specified by:
setEPISODE_TIMING in interface TreatmentAuthorizationIF
Parameters:
M0110_EPISODE_TIMING -

getClinicalScore

public PointsScoringEquationsIF getClinicalScore()
gets the ClinicalScore

Specified by:
getClinicalScore in interface TreatmentAuthorizationIF
Returns:
clinical scoring values

setClinicalScore

public void setClinicalScore(PointsScoringEquationsIF clinicalScore)
Sets the clinical scoring values

Specified by:
setClinicalScore in interface TreatmentAuthorizationIF
Parameters:
clinicalScore -

getFunctionalScore

public PointsScoringEquationsIF getFunctionalScore()
gets the FunctionalScore

Specified by:
getFunctionalScore in interface TreatmentAuthorizationIF
Returns:
the functional scoring values

setFunctionalScore

public void setFunctionalScore(PointsScoringEquationsIF functionalScore)
Sets the functional scoring values

Specified by:
setFunctionalScore in interface TreatmentAuthorizationIF
Parameters:
functionalScore -

getClinicalScoreCount

public int getClinicalScoreCount()
gets the Clinical Score number of equation

Specified by:
getClinicalScoreCount in interface TreatmentAuthorizationIF
Returns:
the number of scoring equations. If the clinical score is not null, then it returns 4, otherwise 0

getFunctionalScoreCount

public int getFunctionalScoreCount()
gets the Functional Score number of equation

Specified by:
getFunctionalScoreCount in interface TreatmentAuthorizationIF
Returns:
the number of scoring equations. If the functional score is not null, then it returns 4, otherwise 0

getClinicalScoreValue

public int getClinicalScoreValue(int equationNumber)
gets the Clinical score of a specific equation

Specified by:
getClinicalScoreValue in interface TreatmentAuthorizationIF
Parameters:
equationNumber -
Returns:
the individual clinical score based on the equation number

getFunctionalScoreValue

public int getFunctionalScoreValue(int equationNumber)
gets the Functional score of a specific equation

Specified by:
getFunctionalScoreValue in interface TreatmentAuthorizationIF
Parameters:
equationNumber -
Returns:
the individual functional score based on the equation number

getScoreValue

protected final int getScoreValue(PointsScoringEquationsIF score,
                                  int equationNumber)
Generic method for retrieving the equation score for a supplied equation.

Parameters:
score -
equationNumber -
Returns:
the score, or 0 if the equation is not found

getAuthorizationCode

public java.lang.String getAuthorizationCode()
Creates a authorization code base on the following: 1. Set M0030_YY = M0030_START_CARE_YR34 (99) 2. Set M0030_DATE_CODE = value returned from searching Table 8: “Hexavigesimal Code Tables (converting dates and point values to letter codes) - Part 1 – DATES” in the Appendix with value of M0030_START_CARE_MMDD (XX) 3. Set M0090_YY = M0090_INFO_COMPLETED_YR34 (99) 4. Set M0090_DATE_CODE = value returned from searching Table 8: “Hexavigesimal Code Tables (converting dates and point values to letter codes) - Part 1 – DATES” in the Appendix with value of M0090_INFO_COMPLETED_MMDD (XX) 5. Set M0100_1 = M0100_ASSMT_REASON2 (X) 6. If M0110_EPISODE_TIMING = UK or 01, M0110_1_2 = 1 Else, If M0110_EPISODE_TIMING = 02, M0110_1_2 = 2 (X) 7. Set CLIN_SCORE1_CD = value returned from searching Table 8: “Hexavigesimal Code Tables (converting dates and point values to letter codes) - Part 2 – POINTS” in the Appendix with value of CLIN_SCORE1 (X) 8. Set FUNC_SCORE1_CD = value returned from searching Table 8: “Hexavigesimal Code Tables (converting dates and point values to letter codes) - Part 2 – POINTS” in the Appendix with value of FUNC_SCORE1 (X) 9. Set CLIN_SCORE2_CD = value returned from searching Table 8: “Hexavigesimal Code Tables (converting dates and point values to letter codes) - Part 2 – POINTS” in the Appendix with value of CLIN_SCORE2 (X) 10. Set FUNC_SCORE2_CD = value returned from searching Table 8: “Hexavigesimal Code Tables (converting dates and point values to letter codes) - Part 2 – POINTS” in the Appendix with value of FUNC_SCORE2 (X) 11. Set CLIN_SCORE3_CD = value returned from searching Table 8: “Hexavigesimal Code Tables (converting dates and point values to letter codes) - Part 2 – POINTS” in the Appendix with value of CLIN_SCORE3 (X) 12. Set FUNC_SCORE3_CD = value returned from searching Table 8: “Hexavigesimal Code Tables (converting dates and point values to letter codes) - Part 2 – POINTS” in the Appendix with value of FUNC_SCORE3 (X) 13. Set CLIN_SCORE4_CD = value returned from searching Table 8: “Hexavigesimal Code Tables (converting dates and point values to letter codes) - Part 2 – POINTS” in the Appendix with value of CLIN_SCORE4 (X) 14. Set FUNC_SCORE4_CD = value returned from searching Table 8: “Hexavigesimal Code Tables (converting dates and point values to letter codes) - Part 2 – POINTS” in the Appendix with value of FUNC_SCORE4 (X)

Specified by:
getAuthorizationCode in interface TreatmentAuthorizationIF
Returns:

getAuthorizationCodeParts

public java.lang.String[] getAuthorizationCodeParts()
gets the authorization code split into an array of Strings for its individual pieces

Specified by:
getAuthorizationCodeParts in interface TreatmentAuthorizationIF
Returns:
The Treatment information as text codes, with each authorization item as a separate array item. This should never return null.

toString

public java.lang.String toString()
Same as getAuthorizationCode()

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