yubin-park / hccpy

A Python implementation of Hierarchical Condition Categories
Apache License 2.0
97 stars 59 forks source link

Missing code for heart interaction patch #58

Closed ronnie-canopy closed 1 year ago

ronnie-canopy commented 1 year ago

Lines 448 to 450 of V2823T2M.txt contain the condition:

        %*heart interaction patch;
        IF CC223 = 1 AND MAX(CC221, CC222, CC224, CC225, CC226) = 0                                                                                                                                          
        THEN CC223 = 0;  

Should these lines also appear in the corresponding Python file? I do not see them present.

yubin-park commented 1 year ago

@ronnie-canopy really good catch! thanks. I will patch it now

yubin-park commented 1 year ago

@ronnie-canopy I just added this block at line 84 in hcc.py

        if self.version == "28": # V28 weird patch for heart
            if (cc_cnt["HCC223"] > 0 and 
                (cc_cnt["HCC221"] + cc_cnt["HCC222"] + 
                cc_cnt["HCC224"] + cc_cnt["HCC225"] + 
                cc_cnt["HCC226"]) == 0):
                cc_cnt["HCC223"] = 0
Short-N commented 8 months ago

Interesting that the Advance Notice copy only includes 224, 225, and 226 in the criteria.