Discussions related to Visual Prolog
fred malack
Active Member
Posts: 28
Joined: 9 Mar 2014 6:35

Thanx alot ...

Unread post by fred malack »

thaanx alot i have i did implement it thanks
But it gives me one error(undeclared predicate or fact 'diagnosis/0'
fr@dlu
User avatar
Thomas Linder Puls
VIP Member
Posts: 1398
Joined: 28 Feb 2000 0:01

Unread post 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).
Regards Thomas Linder Puls
PDC
fred malack
Active Member
Posts: 28
Joined: 9 Mar 2014 6:35

Thanx alot sir i managed to solve the problem of retract

Unread post 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.
fr@dlu
User avatar
Thomas Linder Puls
VIP Member
Posts: 1398
Joined: 28 Feb 2000 0:01

Unread post by Thomas Linder Puls »

Please
  • use new mails for new questions
  • And don't ask the same question several times (you have already asked this question in another mail)
Regards Thomas Linder Puls
PDC
fred malack
Active Member
Posts: 28
Joined: 9 Mar 2014 6:35

Thanx

Unread post by fred malack »

Thanx and i understand thank u...
fr@dlu
Post Reply