عضو جدید
تاريخ عضويت: آبان ۱۳۹۳
پست ها: 2
تشكرها: 0
0 تشكر در 0 پست
|
% **********************************************
hads(sarmakhordegi_va_bayad_astaminophen ) :- sarmakhordegi,!.
hads(kambodevitaminB_va_bayad_vitaminB-complex ) :- kambodevitaminb, !.
hads(fesharekhon_va_bayad_Furosemide) :- fesharekhon, !.
hads(narahatighalbi_va_bayad_propranolol) :- narahatighalbi, !.
hads(diabetesi_va_bayad_ansulin) :- diabetes, !.
hads(jadid).
%======================= level 1 =====================
sarmakhordegi :- neshan1 , verify(tab_shadid_darad).
sarmakhordegi :- neshan1 , verify(ehsass_khastegi_mikonad).
kambodevitaminb :- neshan2, verify(rizesh_mo).
kambodevitaminb :- neshan2, verify(khonrizi_lase).
fesharekhon :- neshan3, verify(tangi_nafas).
fesharekhon :- neshan3, verify(bikhabi).
narahatighalbi :- neshan4, verify(sargige).
narahatighalbi :- neshan4, verify(zaf_va_khastegi_zodras).
diabetes :- neshan5, verify(noshidan_ab_ziyad).
diabetes :- neshan5, verify(khoshkiy_dahan).
% ====================== level 2 ======================
neshan1 :- neshan10 , verify(sorfeh_darad),!.
neshan1 :- neshan10 , verify(galodard_darad).
neshan2 :- neshan20 , verify(khoshki_post), !.
neshan2 :- neshan20 , verify(ehsas_zaf_dar_badan).
neshan3 :- neshan30 , verify(sargijeh_darad), !.
neshan3 :- neshan30 , verify(tapeshe_ghalb).
neshan4 :- neshan40 , verify(tapeshe_ghalb), !.
neshan4 :- neshan40 , verify(tangi_nafas).
neshan5 :- neshan50 , verify(keheshe_vazn), !.
neshan5 :- neshan50 , verify(tari_did_khastegi).
%====================== level 3 =====================
neshan10 :- verify(abrizesh_bini_darad).
neshan10 :- verify(modam_atseh_mikonad).
neshan20 :- verify(lab_bimar_tarak_khorde).
neshan20 :- verify(rang_bimar_paride).
neshan30 :- verify(sardard_poshte_sar_be_hengame_sobh_darad).
neshan30 :- verify(tari_did_darad).
neshan40 :- verify(dard_ghafase_sine_darad).
neshan40 :- verify(dard_taraf_chap_badan).
neshan50 :- verify(por_edrari).
neshan50 :- verify(por_khori).
% *************************Ask Question*********************
Query:read(X,'y').
ask(Question) :-
write('bimar neshane haye ingone darad : '),
write(Question),
write('? '),
read(Response),
nl,
( (Response == yes ; Response == y)
->
assert(yes(Question)) ;
assert(no(Question)), fail).
% **********************************************
:- dynamic yes/1,no/1.
verify(S) :- (yes(S) -> true ;(no(S) -> fail ; ask(S))).
% *******************Delete all asserted data with yes/no********
undo :- retract(yes(_)),fail.
undo :- retract(no(_)),fail.
undo.
% *************** Start Tashkhis Pezeshki *********************
:- write('******************************************* ****************'),nl,
write('******* WELCOME TO MY SPECIFICATION PATIENT ************** '),nl,
write('******************************************* ****************'),nl,nl,
hads(Maraz),
write('man hads mizanam bimarye shoma << '),
write(Maraz),
write(' >> masraf konid.'),
nl,nl,
nl,nl,
write(question);
undo,
write('>>>> Tanks For Use Of Me !!!... '),nl,
write('******************************************* ****************'),nl,nl.
آیا میتوان پس از پاسخ مثب به سوالها جوابها را در انتها به عنوان توضیح چرایی(WHY) نمایش داد
|