com.mmm.cms.homehealth.v2308_1
Class ClinicalFunctional_ScoringModel_v2308

java.lang.Object
  extended by com.mmm.cms.homehealth.v2308_1.ClinicalFunctional_ScoringModel_v2308
All Implemented Interfaces:
HomeHealthScoringModelIF, Namable

public class ClinicalFunctional_ScoringModel_v2308
extends java.lang.Object
implements HomeHealthScoringModelIF

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


Constructor Summary
ClinicalFunctional_ScoringModel_v2308(HomeHealthGrouperIF grouper, GrouperDataManager grouperDataManager, int equationId)
          Constructor with references to the Grouper, the Data manager, and the equation id
 
Method Summary
 int[] calculateInitialScore(HomeHealthRecordIF record, HomeHealthRecordValidatorIF validator)
          There is no initial scoring of the HomeHealth Record for this model, and this method should not be used.
 void determinePrimaryDiagnosis(HomeHealthRecordIF record, HomeHealthRecordValidatorIF validator, int[] icd9Points)
          Determining the primary diagnosis between the two pairs M0230a/240b or M0246a3/M0246a4.
protected  void fireScoringCodeEligible(int position, Icd9DiagnosisCodeIF code)
          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 fireScoringIncreaseEvent(java.lang.String message, int diagnosisPosition, int rowId)
          Scoring Event support method
protected  void fireScoringSectionFinished(java.lang.String message, int score)
          Scoring Event support method
protected  void fireScoringSectionFinished(java.lang.String message, int[] scores)
          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)
          Searches for the case mix object using the id - i.e.
 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)
          The Icd9DiagnosisCodeIF with its value being codeValue.
 HomeHealthGrouperIF getGrouper()
          Gets the reference to the Grouper
 java.lang.String getName()
          The name of this version.
 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 recalculateNonPrimaryCodes(HomeHealthRecordIF record, HomeHealthRecordValidatorIF validator, int[] icd9Points, int[] dualPointsSE)
          Recalculate the score of each non-primary diagnosis in casemix variables with different scores for primary vs.
 boolean[] resolveEtiologyManifestationContention(HomeHealthRecordIF record, HomeHealthRecordValidatorIF validator, int[] icd9_pointsSE, boolean[] diagGroupsUsed)
          Cycle through all diagnosis positions with points.
 ScoringPointsIF score(HomeHealthRecordIF record, HomeHealthRecordValidatorIF validator)
          This is the main scoring module, which scores the clinical information first and then the functional information.
 int scoreClinical(HomeHealthRecordIF record, HomeHealthRecordValidatorIF validator)
          Clinically scores the record placing values into the pointSE, and dualPointsSE variables.
 int scoreFunctional(HomeHealthRecordIF record, HomeHealthRecordValidatorIF validator)
          Score the functional part of the model Pseudo code lines: 1492 thru 1517
 int scoreRemainingVariables(HomeHealthRecordIF record, HomeHealthRecordValidatorIF validator, int[] points)
          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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClinicalFunctional_ScoringModel_v2308

public ClinicalFunctional_ScoringModel_v2308(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)

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. If called, this method will throw an Unsupported Operation Exception.

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

calculateInitialScore

public int[] calculateInitialScore(HomeHealthRecordIF record,
                                   HomeHealthRecordValidatorIF validator)
There is no initial scoring of the HomeHealth Record for this model, and this method should not be used. If called, this method will throw an Unsupported Operation Exception.

Parameters:
record -
validator -

determinePrimaryDiagnosis

public void determinePrimaryDiagnosis(HomeHealthRecordIF record,
                                      HomeHealthRecordValidatorIF validator,
                                      int[] icd9Points)
Determining the primary diagnosis between the two pairs M0230a/240b or M0246a3/M0246a4. This must be done separately for each equation, because of differences in which codes earn points under each equation, which can determine which diagnoses are recognized for scoring and how many points they earn. Pseudo code lines: 1264 thru 1309

Parameters:
record -
validator - - the validator should have already preformed validation on the current record
icd9Points -

resolveEtiologyManifestationContention

public boolean[] resolveEtiologyManifestationContention(HomeHealthRecordIF record,
                                                        HomeHealthRecordValidatorIF validator,
                                                        int[] icd9_pointsSE,
                                                        boolean[] diagGroupsUsed)
Cycle through all diagnosis positions with points. Drop points for non-initial occurrences of any diagnosis groups. Resolve contention within etiology/manifestation pairs when both are casemix diagnoses in different diagnosis groups by retaining the DG with higher score unless that DG has already earned points via a previous occurrence. Pseudo code lines: 1343 thru 1415

Parameters:
record -
validator -
icd9_pointsSE -
diagGroupsUsed -
Returns:

recalculateNonPrimaryCodes

public void recalculateNonPrimaryCodes(HomeHealthRecordIF record,
                                       HomeHealthRecordValidatorIF validator,
                                       int[] icd9Points,
                                       int[] dualPointsSE)
Recalculate the score of each non-primary diagnosis in casemix variables with different scores for primary vs. other diagnosis by setting that diagnosis’ score to zero and rescoring, giving only the points that are based on being an “other” diagnosis. Pseudo code lines: 1311 thru 1337

Parameters:
record -
validator -
icd9Points -
dualPointsSE -

scoreRemainingVariables

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

Parameters:
record -
validator -
points -
Returns:

getName

public java.lang.String getName()
The name of this version.

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)
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)
The Icd9DiagnosisCodeIF with its value being 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)
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: 1149 thru 1490

Parameters:
record -
validator -
Returns:

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

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 -

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)

fireScoringIncreaseEvent

protected void fireScoringIncreaseEvent(java.lang.String message,
                                        int diagnosisPosition,
                                        int rowId)
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[] scores)
Scoring Event support method

Parameters:
message -
scores -
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)

fireScoringCodeEligible

protected void fireScoringCodeEligible(int position,
                                       Icd9DiagnosisCodeIF code)
Scoring Event support method

Parameters:
position -
code -
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)