Page 2 of 2

Thanx alot ...

Posted: 3 Jun 2014 8:06
by fred malack
thaanx alot i have i did implement it thanks
But it gives me one error(undeclared predicate or fact 'diagnosis/0'

Posted: 3 Jun 2014 8:35
by Thomas Linder Puls
I don't know the entire structure of your program, so I don't know the name of the predicate in which you should place the retractAll call.

So diagnose is "random" name representing the process of diagnosing one patient. So the first thing you do when you want to diagnose a patient is to retract all knowledge about the previous patient. Then you do all the other stuff you want to do (i.e. ask patient and symptom info and use your rules).

Thanx alot sir i managed to solve the problem of retract

Posted: 3 Jun 2014 10:27
by fred malack
I have another question that concerned with
Output the diagnose diseases

Code: Select all

  Predicates       gradeDisease: (name Patient) nondeterm.     clauses       gradeDisease(Patient,Disease),       VpiCommonDialogs::note(Patient,tostring(Disease)).
The above code output the name of the patient and the disease..
I changed the clauses part so that when it doesnt diagnose
To give a note that couldnt diagnose..

Code: Select all

clauses   gradesDisease(Patient) :-      If  hypothesis(Patient, Disease) then             VpiCommonDialogs::note(Patient,tostring(Disease))        else              VPiCommonDialogs::note(Patient, "couldnt diagnose")   End if.
The problem i have i that it diagnose and give out only one disease please i need help.

Posted: 3 Jun 2014 12:46
by Thomas Linder Puls
  • use new mails for new questions
  • And don't ask the same question several times (you have already asked this question in another mail)


Posted: 3 Jun 2014 13:18
by fred malack
Thanx and i understand thank u...