How to construct an ontological knowledge base

For example, for the BloodPressureMonitor, older people with diabetes will have a different alert condition than a young child without diabetes. You can use a hierarchy (a light weight ontology) to represent knowledge about different age groups with different pre-conditions.

You need to do a little research online to construct a meaningful knowledge base. You can define your own messages to maintain and accesss your knowledge base.