com.mmm.cms.homehealth.v3210
Class ClinicalFunctional_ScoringModel_v3210

java.lang.Object
  extended by com.mmm.cms.homehealth.v3210.ClinicalFunctional_ScoringModel_v3210
All Implemented Interfaces:
HomeHealthScoringModelIF, Namable
Direct Known Subclasses:
NRS_ScoringModel_v3210

public class ClinicalFunctional_ScoringModel_v3210
extends java.lang.Object
implements HomeHealthScoringModelIF

This Model provides scoring for the 4 clinical and functional equations defined for Grouper version 2.03.


Field Summary
protected  HomeHealthGrouperIF grouper
           
protected  GrouperDataManager grouperDataManager
           
 
Constructor Summary
ClinicalFunctional_ScoringModel_v3210(HomeHealthGrouperIF grouper, GrouperDataManager grouperDataManager, int equationId)
          Constructor with references to the Grouper, the Data manager, and the equation id
 
Method Summary
protected  int calculatePrimaryAdjustment(DiagnosisScoringGridIF scoringGrid, int primaryAdjustmentRow, int otherAdjustmentRow)
          This calculates the primary code score, and if the Other Dx has already been scored, then reduce the primary code by the Other Dx value.
 int determinePrimaryDiagnosis(HomeHealthRecordIF record, DiagnosisScoringGridIF scoringGrid)
          This method is not used in this model
 int[][] determineScoreOrder(HomeHealthRecordIF record)
          Returns a non-null double array of int[6][3].
 void fireDxGroupAlreadyScored(Icd9DiagnosisCodeIF code, int position, AlreadyScoredException e)
          Scoring Event support method
 void fireScoringEvent(HomeHealthEvent event)
          This method, along with the other fire...
protected  void fireScoringGeneral(java.lang.String message)
          Scoring Event support method
protected  void fireScoringIncreaseCodeEvent(Icd9DiagnosisCodeIF diagCode, int diagnosisPosition, int rowId, int score)
          Scoring Event support method
protected  void fireScoringIncreaseEvent(java.lang.String message, int rowId, int score)
          Scoring Event support method
protected  void fireScoringIncreaseEvent(java.lang.String message, int diagnosisPosition, int rowId, int value)
          Scoring Event support method
protected  void fireScoringSectionFinished(java.lang.String message, int score)
          Scoring Event support method
protected  void fireScoringSectionStart(java.lang.String message)
          Scoring Event support method
protected  void fireScoringWarning(java.lang.String message)
          Scoring Event support method
protected  void fireValidCodeWarning(Icd9DiagnosisCodeIF code, int position, boolean isValid)
          Scoring Event support method
 CaseMixAdjustmentItemIF getCaseMixAdjustment(int caseMixId)
          Deprecated.  
 int getCaseMixAdjustmentEquation(int caseMixId, int equationId)
          This gets the Case Mix Adjustment table value, by essentially getting the caseMixId (i.e.
protected  Icd9DiagnosisCodeIF getDiagnosisCode(java.lang.String codeValue)
           
 HomeHealthGrouperIF getGrouper()
          Gets the reference to the Grouper
 java.lang.String getName()
          The run-time name
 java.lang.String getShortName()
          gets the short name for this Scoring Model
 void populateCodes(HomeHealthRecordIF record)
          This populates the record with all Diagnosis codes that are valid for this grouper version that are listed on the record.
 void preprocessRecord(HomeHealthRecordIF record, HomeHealthRecordValidatorIF validator)
          There is no preprocessing of the HomeHealth Record for this model, and this method should not be used.
 void resolveEtiologyManifestationContention(Icd9DiagnosisCodeIF etiologyCode, int etiologyIdx, Icd9DiagnosisCodeIF manifestionCode, int manifestIdx, DiagnosisScoringGridIF scoringGrid)
          Given two codes that are part of a Manifestation/Etiology pair, determine which code has the highest score and remove the value for the code with the lowest score.
 ScoringPointsIF score(HomeHealthRecordIF record, HomeHealthRecordValidatorIF validator)
          This is the main scoring module, which scores the clinical information first and then the functional information.
 ScoringPointsIF score(HomeHealthRecordIF record, HomeHealthRecordValidatorIF validator, int[][] scoreOrder)
          This is the main scoring module, which scores the clinical information first and then the functional information.
 void scoreAny(HomeHealthRecordIF record, Icd9DiagnosisCodeIF diagCode, HomeHealthRecordValidatorIF validator, int diagIdx, DiagnosisScoringGridIF scoringGrid)
          This section covers scoring of Diagnostic groups and Case Mix Adjustment Rows that do not depend on Primary or Other specific values for the code
 int scoreClinical(HomeHealthRecordIF record, HomeHealthRecordValidatorIF validator)
          Deprecated.  
 int scoreClinical(HomeHealthRecordIF record, HomeHealthRecordValidatorIF validator, int[][] scoreOrder)
          Clinically scores the record placing values into the pointSE, and dualPointsSE variables.
 void scoreClinicalCode(HomeHealthRecordIF record, Icd9DiagnosisCodeIF diagCode, HomeHealthRecordValidatorIF validator, int diagIdx, DiagnosisScoringGridIF scoringGrid)
           
 void scoreClinicalColumn3_4(HomeHealthRecordIF record, HomeHealthRecordValidatorIF validator, int rowIdx, DiagnosisScoringGridIF scoringGrid, int[][] scoreOrder, int currentPass)
          After the first column (historically column 2) has determined that it is an Optional V-code that can have a column 3 & 4, this method will score those codes on the same row, and resolve any manifestation/ etiology contentions.
 int scoreFunctional(HomeHealthRecordIF record, HomeHealthRecordValidatorIF validator)
          Score the functional part of the model Pseudo code lines: 1492 thru 1517
 void scoreOtherOnly(HomeHealthRecordIF record, Icd9DiagnosisCodeIF diagCode, int diagIdx, DiagnosisScoringGridIF scoringGrid)
          Scores only those codes that can not be in the primary position
 void scorePrimaryOnly(HomeHealthRecordIF record, Icd9DiagnosisCodeIF diagCode, int diagIdx, DiagnosisScoringGridIF scoringGrid)
          Scores the Primary only code with Primary only CaseMix values
 int scoreRemainingVariables(HomeHealthRecordIF record, HomeHealthRecordValidatorIF validator, int currentScore)
          This scores the remaining clinical variables.
 void setGrouper(HomeHealthGrouperIF grouper)
          Sets the Home Health grouper that this model is associated with, null if no grouper
 void setName(java.lang.String arg0)
          This method does nothing - the name can not be reset
 void setShortName(java.lang.String shortName)
          sets the short name for this Scoring Model
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

grouperDataManager

protected GrouperDataManager grouperDataManager

grouper

protected HomeHealthGrouperIF grouper
Constructor Detail

ClinicalFunctional_ScoringModel_v3210

public ClinicalFunctional_ScoringModel_v3210(HomeHealthGrouperIF grouper,
                                             GrouperDataManager grouperDataManager,
                                             int equationId)
Constructor with references to the Grouper, the Data manager, and the equation id

Parameters:
grouper -
grouperDataManager -
equationId -
Method Detail

score

public ScoringPointsIF score(HomeHealthRecordIF record,
                             HomeHealthRecordValidatorIF validator)
This is the main scoring module, which scores the clinical information first and then the functional information.

Specified by:
score in interface HomeHealthScoringModelIF
Parameters:
record -
validator -
Returns:
ScoringPointsIF that contains the clinical and functional scoring elements. This will never be null
See Also:
scoreClinical(HomeHealthRecordIF record, HomeHealthRecordValidatorIF validator), scoreFunctional(HomeHealthRecordIF record, HomeHealthRecordValidatorIF validator)

score

public ScoringPointsIF score(HomeHealthRecordIF record,
                             HomeHealthRecordValidatorIF validator,
                             int[][] scoreOrder)
This is the main scoring module, which scores the clinical information first and then the functional information.

Parameters:
record -
validator -
Returns:
ScoringPointsIF that contains the clinical and functional scoring elements. This will never be null
See Also:
scoreClinical(HomeHealthRecordIF record, HomeHealthRecordValidatorIF validator), scoreFunctional(HomeHealthRecordIF record, HomeHealthRecordValidatorIF validator)

preprocessRecord

public void preprocessRecord(HomeHealthRecordIF record,
                             HomeHealthRecordValidatorIF validator)
There is no preprocessing of the HomeHealth Record for this model, and this method should not be used.

Specified by:
preprocessRecord in interface HomeHealthScoringModelIF
Parameters:
record -
validator -

scoreRemainingVariables

public int scoreRemainingVariables(HomeHealthRecordIF record,
                                   HomeHealthRecordValidatorIF validator,
                                   int currentScore)
This scores the remaining clinical variables. Pseudo code lines: 1435 thru 1490

Parameters:
record -
validator -
Returns:

getName

public java.lang.String getName()
Description copied from interface: Namable
The run-time name

Specified by:
getName in interface Namable
Returns:
The name of this scoring model

setName

public void setName(java.lang.String arg0)
This method does nothing - the name can not be reset

Specified by:
setName in interface Namable
Parameters:
arg0 -

getCaseMixAdjustmentEquation

public int getCaseMixAdjustmentEquation(int caseMixId,
                                        int equationId)
This gets the Case Mix Adjustment table value, by essentially getting the caseMixId (i.e. row) and the equation and returning the value.

Parameters:
caseMixId -
equationId -
Returns:
the adjustment or 0 if the case mix id is not found, or the adjustment value is blank

getCaseMixAdjustment

public CaseMixAdjustmentItemIF getCaseMixAdjustment(int caseMixId)
Deprecated. 

Searches for the case mix object using the id - i.e. the row number, for the set of equations

Parameters:
caseMixId -
Returns:
the case mix equation information or null if the id does not exist

getDiagnosisCode

protected Icd9DiagnosisCodeIF getDiagnosisCode(java.lang.String codeValue)
Parameters:
codeValue -
Returns:
the Icd9Code with its value being codeValue. If the code is not valid (found for this version), then the Invalid flag will be set to true and all other information about the code will be meaninless. This method should never return null.

scoreClinical

public int scoreClinical(HomeHealthRecordIF record,
                         HomeHealthRecordValidatorIF validator)
Deprecated. 

Parameters:
record -
validator -
Returns:

scoreClinical

public int scoreClinical(HomeHealthRecordIF record,
                         HomeHealthRecordValidatorIF validator,
                         int[][] scoreOrder)
Clinically scores the record placing values into the pointSE, and dualPointsSE variables. The scoring is split up into Diagnosis Group related questions and drill down further. Pseudo code lines: no longer appropriate because this simplifies the logic

Parameters:
record -
validator -
Returns:

determineScoreOrder

public int[][] determineScoreOrder(HomeHealthRecordIF record)
Returns a non-null double array of int[6][3]. The values in the array elements are as follows: Stand alone etiology codes are always scored first, then the manifestation/ etiology pair codes are scored second. Codes that are not valid for scoring are not evaulated and there for entry in the array will be 0

Parameters:
record -
Returns:

scorePrimaryOnly

public void scorePrimaryOnly(HomeHealthRecordIF record,
                             Icd9DiagnosisCodeIF diagCode,
                             int diagIdx,
                             DiagnosisScoringGridIF scoringGrid)
                      throws AlreadyScoredException
Scores the Primary only code with Primary only CaseMix values

Parameters:
record -
diagCode -
diagIdx -
scoringGrid -
Throws:
AlreadyScoredException

calculatePrimaryAdjustment

protected int calculatePrimaryAdjustment(DiagnosisScoringGridIF scoringGrid,
                                         int primaryAdjustmentRow,
                                         int otherAdjustmentRow)
This calculates the primary code score, and if the Other Dx has already been scored, then reduce the primary code by the Other Dx value.

Parameters:
scoringGrid -
primaryAdjustmentRow -
otherAdjustmentRow -
Returns:

scoreOtherOnly

public void scoreOtherOnly(HomeHealthRecordIF record,
                           Icd9DiagnosisCodeIF diagCode,
                           int diagIdx,
                           DiagnosisScoringGridIF scoringGrid)
                    throws AlreadyScoredException
Scores only those codes that can not be in the primary position

Parameters:
record -
diagCode -
diagIdx -
scoringGrid -
Throws:
AlreadyScoredException

scoreAny

public void scoreAny(HomeHealthRecordIF record,
                     Icd9DiagnosisCodeIF diagCode,
                     HomeHealthRecordValidatorIF validator,
                     int diagIdx,
                     DiagnosisScoringGridIF scoringGrid)
              throws AlreadyScoredException
This section covers scoring of Diagnostic groups and Case Mix Adjustment Rows that do not depend on Primary or Other specific values for the code

Parameters:
record -
diagCode -
diagIdx -
scoringGrid -
Throws:
AlreadyScoredException

scoreClinicalCode

public void scoreClinicalCode(HomeHealthRecordIF record,
                              Icd9DiagnosisCodeIF diagCode,
                              HomeHealthRecordValidatorIF validator,
                              int diagIdx,
                              DiagnosisScoringGridIF scoringGrid)

scoreClinicalColumn3_4

public void scoreClinicalColumn3_4(HomeHealthRecordIF record,
                                   HomeHealthRecordValidatorIF validator,
                                   int rowIdx,
                                   DiagnosisScoringGridIF scoringGrid,
                                   int[][] scoreOrder,
                                   int currentPass)
After the first column (historically column 2) has determined that it is an Optional V-code that can have a column 3 & 4, this method will score those codes on the same row, and resolve any manifestation/ etiology contentions.

Parameters:
record -
diagCode -
validator -
diagGroupsUsed -
rowIdx -
scoringGrid -

scoreFunctional

public int scoreFunctional(HomeHealthRecordIF record,
                           HomeHealthRecordValidatorIF validator)
Score the functional part of the model Pseudo code lines: 1492 thru 1517

Parameters:
record -
validator -
Returns:
the functional score

resolveEtiologyManifestationContention

public void resolveEtiologyManifestationContention(Icd9DiagnosisCodeIF etiologyCode,
                                                   int etiologyIdx,
                                                   Icd9DiagnosisCodeIF manifestionCode,
                                                   int manifestIdx,
                                                   DiagnosisScoringGridIF scoringGrid)
Given two codes that are part of a Manifestation/Etiology pair, determine which code has the highest score and remove the value for the code with the lowest score. Tie goes to the Etiology code

Parameters:
diagCode -
scoringRowsSecondary -
scoringRowsPrevious -

populateCodes

public void populateCodes(HomeHealthRecordIF record)
This populates the record with all Diagnosis codes that are valid for this grouper version that are listed on the record. Codes that are found are marked as Valid, otherwise the code is mark as not Valid, and not Valid for scoring. This method should be called prior to scoring the

Specified by:
populateCodes in interface HomeHealthScoringModelIF
Parameters:
record -

getGrouper

public HomeHealthGrouperIF getGrouper()
Gets the reference to the Grouper

Specified by:
getGrouper in interface HomeHealthScoringModelIF
Returns:
the Home Health grouper that this model is associated with, null if no grouper

setGrouper

public void setGrouper(HomeHealthGrouperIF grouper)
Sets the Home Health grouper that this model is associated with, null if no grouper

Specified by:
setGrouper in interface HomeHealthScoringModelIF
Parameters:
grouper -

getShortName

public java.lang.String getShortName()
gets the short name for this Scoring Model

Returns:

setShortName

public void setShortName(java.lang.String shortName)
sets the short name for this Scoring Model

Parameters:
shortName -

fireScoringEvent

public void fireScoringEvent(HomeHealthEvent event)
This method, along with the other fire... methods, and a liberal amount of calls to these methods allows a developer to "watch" the scoring process in detail. These are not necessary for actual scoring, but provides an in depth view of the process; helpful for debugging and understanding the scoring process.

Parameters:
event -
See Also:
HomeHealthEventNotifierIF.notifyEventListeners(HomeHealthEventIF event)

fireScoringIncreaseCodeEvent

protected void fireScoringIncreaseCodeEvent(Icd9DiagnosisCodeIF diagCode,
                                            int diagnosisPosition,
                                            int rowId,
                                            int score)
Scoring Event support method

Parameters:
message -
diagnosisPosition -
rowId -
See Also:
fireScoringEvent(HomeHealthEvent)

fireScoringIncreaseEvent

protected void fireScoringIncreaseEvent(java.lang.String message,
                                        int rowId,
                                        int score)
Scoring Event support method

Parameters:
message -
diagnosisPosition -
rowId -
See Also:
fireScoringEvent(HomeHealthEvent)

fireScoringIncreaseEvent

protected void fireScoringIncreaseEvent(java.lang.String message,
                                        int diagnosisPosition,
                                        int rowId,
                                        int value)
Scoring Event support method

Parameters:
message -
diagnosisPosition -
rowId -
See Also:
fireScoringEvent(HomeHealthEvent)

fireScoringGeneral

protected void fireScoringGeneral(java.lang.String message)
Scoring Event support method

Parameters:
message -
See Also:
fireScoringEvent(HomeHealthEvent)

fireScoringWarning

protected void fireScoringWarning(java.lang.String message)
Scoring Event support method

Parameters:
message -
See Also:
fireScoringEvent(HomeHealthEvent)

fireScoringSectionStart

protected void fireScoringSectionStart(java.lang.String message)
Scoring Event support method

Parameters:
message -
See Also:
fireScoringEvent(HomeHealthEvent)

fireScoringSectionFinished

protected void fireScoringSectionFinished(java.lang.String message,
                                          int score)
Scoring Event support method

Parameters:
message -
score -
See Also:
fireScoringEvent(HomeHealthEvent)

fireValidCodeWarning

protected void fireValidCodeWarning(Icd9DiagnosisCodeIF code,
                                    int position,
                                    boolean isValid)
Scoring Event support method

Parameters:
code -
position -
isValid -
See Also:
fireScoringEvent(HomeHealthEvent)

fireDxGroupAlreadyScored

public void fireDxGroupAlreadyScored(Icd9DiagnosisCodeIF code,
                                     int position,
                                     AlreadyScoredException e)
Scoring Event support method

Parameters:
code -
position -
e -

determinePrimaryDiagnosis

public int determinePrimaryDiagnosis(HomeHealthRecordIF record,
                                     DiagnosisScoringGridIF scoringGrid)
This method is not used in this model

Parameters:
record -
scoringGrid -
Returns: