Business Rules without Java

I like this sample as it explains what Business Rules are, in a way that professional (i.e. non technical people) can understand. This one I originally posted on the O’Reilly Java and JBoss Drools blogs. If you were around in Dublin last month, you’ll notice that it’s also the sample that I talked through at the Irish Java Technologies Conference.

Like many countries, the Health services in Bangladesh can’t get enough doctors. Training more is not a solution ; Qualified doctors often leave for better pay elsewhere. Given the urgent need for trained medical staff in rural areas so save lives (often children dying of curable diseases), what are health workers to do?

The solution that the Health workers came up with was IMCI – or Integrated Management of Childhood Illness. It takes what the Knowledge in Doctor’s head’s and stores it as a simple guide that health workers can follow. When a sick child is brought into the clinic the health worker is able to follow the simple step-by-step instructions to make quite a sophisticated diagnosis.

I’ve no medical training beyond simple CPR (and if you’re relying on that then you’re in real trouble) but even I can understand it.

imci.jpg

Look at the pale blue box in the diagram above. It’s a set of medical rules: Are there any danger signs? What are the main symptoms? What combination of these symptoms are there? What is the age of the child? How long have they been ill? Depending on the outcome of the rules, go to the next set (the pink / yellow /green) boxes and apply the rules that you find there.

That’s Rules and RuleFlow.

  • Rules are ‘when something is present , then do this’. And not just single rules, but many of them. Together, loads of simple rules allow you to come up with quite a sophisticated diagnosis.
  • Ruleflow allows you to group your rules. If you’re a health worker with a sick child you want to do the most important checks first. Depending on the outcome, you then apply the next set of medical rules: Pink if they need urgent referral to the hospital, yellow if the clinic can cope , or green if the child can be looked after at home.

As gory as it sounds, everybody, including the doctors, are happy that their ‘brains have been put into a PC‘ (or in this case , a set of paper cards). The Doctors are happy because they can (guilt free) move to better paying jobs. The medical workers using the system are happy because they can help the sick children that they see every day. And the children gain because the better availability of medical knowledge (via Rules and RuleFlow) is literally the difference between life and death.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s