Fork me on GitHub

Hi, I have a design problem: We’re (very happily) using clara in a medical coding application. So far, we’ve had to deal with a single ICD-10 version and a single body of legislation around it. Since we’re loading all of ICD-10, with all the internal exclusions, references, etc, the rule set is pretty big. But starting january first, a new icd-10 version and a new set of other rules needs to be used for new hospital stays, but the old one for older stays. So now I have to choose between creating two separate rule bases for the two versions, or adding the rule version as input to all rules. What would be your choice?


Probably personal taste here, but imo i would maintain two separate rule bases. Mainly because it should serve to separate concerns, for instance, if you wouldn’t expect a scenario where both were needed simultaneously then you wouldn’t need to run both(together) simultaneously.


thanks @ethanc, they would need to be "active" at the same time, though: loading it all takes far too long to load it on demand, and I don't know in advance which version will be active. I was thinking about it some more, and maybe a more concrete question: 99% of the rules in the two versions will be the same, except for the different version fact as input. Will the rule engine somehow share most of the memory in that case?


Clara attempts to share pieces of rules where it can, if it can determine that they are the same pieces


effectively node sharing in the graph, where possible


Clara would still have to traverse those rules to determine that they are “similar”/“same” but it would avoid re-evaluating the executable portions of the rules. A large portion of the time compiling the session is devoted to evaluating “user code”

👍 1