def _apply_interactions(self, cc_lst, age, disabled): """Returns a list of HCCs after applying interactions. """ if self.version == "22": cc_lst = V2218O1M.create_interactions(cc_lst, disabled) elif self.version == "23": cc_lst = V2318P1M.create_interactions(cc_lst, disabled, age) elif self.version == "24": cc_lst = V2419P1M.create_interactions(cc_lst, disabled, age) return cc_lst
def _apply_hcc(self, dx_lst, age, sex, disabled): """Returns all HCC variables regardless of the eligibility segments. """ dx_set = {dx.strip().upper().replace(".", "") for dx in dx_lst} cc_dct = {dx: self.dx2cc[dx] for dx in dx_set if dx in self.dx2cc} cc_lst = V22I0ED2.apply_agesex_edits(cc_dct, age, sex) cc_lst = self._apply_hierarchy(cc_lst) if self.version == "22": cc_lst = V2218O1M.create_interactions(cc_lst, disabled) elif self.version == "23": cc_lst = V2318P1M.create_interactions(cc_lst, disabled, age) return cc_lst