Ejemplo n.º 1
0
    def uti_per_100(self, params):
        """
        Counts of infections during the period with an
        infection_type of UTI, URI, or Sepsis-Urinary divided by
        member months in the period

        Args:
            params (tuple): start date and end date in format 'YYYY-MM-DD'

        Returns:
            float: UTIs per 100 member months
        """
        enrollment = Enrollment(self.db_filepath)
        return round(
            self.uti_count(params) / enrollment.member_months(params) * 100, 2)
Ejemplo n.º 2
0
    def sepsis_per_100(self, params):
        """
        Counts of infections during the period where 'sepsis'
        is in the infection_type divided by
        member months in the period

        Args:
            params (tuple): start date and end date in format 'YYYY-MM-DD'

        Returns:
            float: sepsis related infections per 100 member months
        """
        enrollment = Enrollment(self.db_filepath)
        return round(
            self.sepsis_count(params) / enrollment.member_months(params) * 100,
            2)
Ejemplo n.º 3
0
    def pressure_ulcer_per_100(self, params):
        """
        Pressure ulcer per 100 member months during the period

        Args:
            params (tuple): start date and end date in format 'YYYY-MM-DD'

        Returns:
            float: Pressure ulcer per 100 member months
        """
        enrollment = Enrollment(self.db_filepath)

        return round(
            (self.pressure_ulcer_count(params) /
             enrollment.member_months(params) * 100),
            2,
        )
Ejemplo n.º 4
0
    def ppts_in_utl_per_100MM(self, params, utilization_table):
        """
        Count of admissions with a discharge date that is null or
        greater than the start date and an admission_date less than the end date
        divided by the member months in the period multiplied by 100

        Args:
            params (tuple): start date and end date in format 'YYYY-MM-DD'
            utilization_table(str): table in database to use as utilization

        Returns:
            int: number of ppts in the utilization type per 100 member months
        """
        e = Enrollment(self.db_filepath)
        return round(
            self.ppts_in_utl(params, utilization_table) /
            e.member_months(params) * 100,
            2,
        )
Ejemplo n.º 5
0
    def adjusted_per_100MM(self, params, incident_table):
        """
        Count of incidents during period minus any incidents by ppts with an
        incidents count greater than the mean plus 3 standard deviations divided
        by the member months in the period multiplied by 100

        Args:
            params (tuple): start date and end date in format 'YYYY-MM-DD'
            incident_table(str): table in database to use as incident

        Returns:
            float: adjusted count of incidents per 100 member months
        """
        enrollment = Enrollment(self.db_filepath)

        return round(
            (self.adjusted_incident_count(params, incident_table) /
             enrollment.member_months(params) * 100),
            2,
        )
Ejemplo n.º 6
0
    def days_per_100MM(self, params, utilization_table):
        """
        First the days for admissions that occur during the params is calculated.
        Next the days for admissions occurring before the period are calculated using
        the start date of the period as the admissions date.
        The sum of these two values are divided by the member months in the period.

        Args:
            params(tuple): start date and end date in format 'YYYY-MM-DD'
            utilization_table(str): table in database to use as utilization

        Returns:
            int: days in period that ppts are in the indicated utilization per 100 member months
        """
        days = self.utilization_days(params, utilization_table)

        enrollment = Enrollment(self.db_filepath)
        census = enrollment.member_months(params)

        return round((days / census) * 100, 2)