com.mmm.cms.homehealth
Class HomeHealthGrouperFactory

java.lang.Object
  extended by com.mmm.cms.homehealth.HomeHealthGrouperFactory
All Implemented Interfaces:
HomeHealthGrouperFactoryIF, Initializable

public class HomeHealthGrouperFactory
extends java.lang.Object
implements HomeHealthGrouperFactoryIF

This Factory holds as set of Groupers and allows selection of a Grouper version by checking the Home Health record validaty against isValidForVersion() method of each available Grouper. The order of the Groupers for the isValidForVersion() check is the same order that the classes are loading into the Factory. The properties file should include the following properties:


Field Summary
static java.lang.String PROPERT_CONFIG_SUFFIX
           
static java.lang.String PROPERTY_HH_CLASS_LIST
           
static java.lang.String PROPERTY_HOME_HEALTH_QUIET
           
 
Fields inherited from interface com.mmm.cms.homehealth.proto.HomeHealthGrouperFactoryIF
PROPERTY_HOME_HEALTH_CONFIG
 
Constructor Summary
HomeHealthGrouperFactory()
          Constructor the initializes the Home Health Groupers list
 
Method Summary
protected  void endProgressBar()
          Stops the progress bar and closes it
 HomeHealthGrouperIF getGrouper(HomeHealthRecordIF record)
          Searches the list of Home Health Groupers to determine which one will handle the record based on the dates on the record
 java.util.Properties getPropertiesFromEnv()
          This finds the configuration/properties file that is defined by the environment variable String PROPERTY_HOME_HEALTH_CONFIG = "home_health_config" If the environment variable is not set then it will use the default properties file defined as config/HomeHealthGrouper.properties
 void init(java.util.Properties props)
          This will load the Home Health Groupers in the order that they are listed in the 'home.health.grouper.class.list' of the Properties, then it will pass the properties files assocaited with that group by the classname.config option.
protected  void startProgressBar()
          provides popup message showing the status of the initialization
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTY_HH_CLASS_LIST

public static final java.lang.String PROPERTY_HH_CLASS_LIST
See Also:
Constant Field Values

PROPERT_CONFIG_SUFFIX

public static final java.lang.String PROPERT_CONFIG_SUFFIX
See Also:
Constant Field Values

PROPERTY_HOME_HEALTH_QUIET

public static final java.lang.String PROPERTY_HOME_HEALTH_QUIET
See Also:
Constant Field Values
Constructor Detail

HomeHealthGrouperFactory

public HomeHealthGrouperFactory()
Constructor the initializes the Home Health Groupers list

Method Detail

getGrouper

public HomeHealthGrouperIF getGrouper(HomeHealthRecordIF record)
Searches the list of Home Health Groupers to determine which one will handle the record based on the dates on the record

Specified by:
getGrouper in interface HomeHealthGrouperFactoryIF
Parameters:
record -
Returns:
HomeHealthGrouperIF for scoring the record or null if no Grouper can be determined a valid to score a record.

init

public void init(java.util.Properties props)
          throws java.lang.Exception,
                 java.rmi.RemoteException
This will load the Home Health Groupers in the order that they are listed in the 'home.health.grouper.class.list' of the Properties, then it will pass the properties files assocaited with that group by the classname.config option. The classes are listed with a space between them and must be the full class name. If the Properties is null, then it calls getPropertiesFromEnv() in order to load the default supplied by the environment variable: PROPERTY_HOME_HEALTH_CONFIG

Specified by:
init in interface Initializable
Parameters:
properties -
Throws:
java.lang.Exception
java.rmi.RemoteException
See Also:
HomeHealthGrouperFactoryIF, getPropertiesFromEnv()

getPropertiesFromEnv

public java.util.Properties getPropertiesFromEnv()
This finds the configuration/properties file that is defined by the environment variable String PROPERTY_HOME_HEALTH_CONFIG = "home_health_config" If the environment variable is not set then it will use the default properties file defined as config/HomeHealthGrouper.properties

Returns:
the Properties loaded from the found configuration/properties file, or null if the environment variable was not set, or the file was not file, or some other I/O exception.
See Also:
HomeHealthGrouperFactoryIF

startProgressBar

protected void startProgressBar()
provides popup message showing the status of the initialization


endProgressBar

protected void endProgressBar()
Stops the progress bar and closes it