Input: input Location case, classified image, text information

Output: Possible disease

Begin:

For input Location case

Location disease = result from CBR//list of diseases

If (Location disease = NULL)//Location case not found in KB

Location = input Location case

Possible disease = fire rules without mapping//no disease is stored on that location

Store possible disease, Location in case base KB//as new case for the location

Else Fire rules with context//Location case found in KB

Compute Mapping for Location disease with rule base

Possible disease = fire rules with mapping

If (Possible disease = NULL)//no solution means it is new or epidemic disease for that Location

Possible disease = fire rules without mapping

Store possible disease, location in case base KB//as new case for the location

END