Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Desktop/dzialo/paste/HelloDoctor.activity/rules.clp
diff options
context:
space:
mode:
Diffstat (limited to 'Desktop/dzialo/paste/HelloDoctor.activity/rules.clp')
-rw-r--r--Desktop/dzialo/paste/HelloDoctor.activity/rules.clp242
1 files changed, 242 insertions, 0 deletions
diff --git a/Desktop/dzialo/paste/HelloDoctor.activity/rules.clp b/Desktop/dzialo/paste/HelloDoctor.activity/rules.clp
new file mode 100644
index 0000000..04e2b4a
--- /dev/null
+++ b/Desktop/dzialo/paste/HelloDoctor.activity/rules.clp
@@ -0,0 +1,242 @@
+(deffacts startup "All possible diseases"
+ (disease 1 Bacillary_dysentery)
+ (disease 2 Dengue)
+ (disease 3 Hepatitis_A)
+ (disease 4 Hepatitis_B)
+ (disease 5 HIV-1)
+ (disease 6 Influenza)
+ (disease 7 Malaria)
+ (disease 8 Measles)
+ (disease 9 Meningoencephalitis)
+ (disease 10 Mucocutaneous_leishmaniasis)
+ (disease 11 Mycobacterium_tuberculosis)
+ (disease 12 Onchocerciasis)
+ (disease 13 Pneumonia)
+ (disease 14 Rotavirus)
+ (disease 15 Schistosoma_haematobium)
+ (disease 16 Sleeping_sickness)
+ (disease 17 Strep_throat)
+ (disease 18 Typhoid_fever)
+ (disease 19 Yellow_fever))
+
+(defrule MAIN::symptomPyrexia "Raised body temperature"
+ (symptom Pyrexia yes)
+ ?adr <- (disease ?
+ Bacillary_dysentery
+ |Hepatitis_A
+ |Meningoencephalitis
+ |Mucocutaneous_leishmaniasis
+ |Onchocerciasis
+ |Rotavirus
+ )
+=>
+ (retract ?adr))
+
+(defrule MAIN::symptomNausea_vomiting "Feeling of sickness, vomiting"
+ (symptom Nausea_vomiting yes)
+ ?adr <- (disease ?
+ Bacillary_dysentery
+ |Dengue
+ |Hepatitis_B
+ |HIV-1
+ |Malaria
+ |Measles
+ |Meningoencephalitis
+ |Mucocutaneous_leishmaniasis
+ |Mycobacterium_tuberculosis
+ |Onchocerciasis
+ |Pneumonia
+ |Schistosoma_haematobium
+ |Sleeping_sickness
+ )
+=>
+ (retract ?adr))
+
+
+(defrule MAIN::symptomDiarrhoea "Faeces discharged from the bowels frequently and in a liquid form"
+ (symptom Diarrhoea yes)
+ ?adr <- (disease ?
+ Dengue
+ |Hepatitis_A
+ |Hepatitis_B
+ |Influenza
+ |Malaria
+ |Measles
+ |Meningoencephalitis
+ |Mucocutaneous_leishmaniasis
+ |Mycobacterium_tuberculosis
+ |Onchocerciasis
+ |Pneumonia
+ |Schistosoma_haematobium
+ |Sleeping_sickness
+ |Strep_throat
+ |Yellow_fever
+ )
+=>
+ (retract ?adr))
+
+(defrule MAIN::symptomRash "Area of redness and spots on a person's skin"
+ (symptom Rash yes)
+ ?adr <- (disease ?
+ Bacillary_dysentery
+ |Hepatitis_A
+ |Hepatitis_B
+ |Influenza
+ |Malaria
+ |Meningoencephalitis
+ |Pneumonia
+ |Rotavirus
+ |Schistosoma_haematobium
+ |Sleeping_sickness
+ |Strep_throat
+ |Yellow_fever
+ )
+=>
+ (retract ?adr))
+
+(defrule MAIN::symptomMyalgia "Pain in a muscle or in a group of muscles"
+ (symptom Myalgia yes)
+ ?adr <- (disease ?
+ Bacillary_dysentery
+ |Dengue
+ |Hepatitis_A
+ |Hepatitis_B
+ |HIV-1
+ |Malaria
+ |Measles
+ |Meningoencephalitis
+ |Mucocutaneous_leishmaniasis
+ |Mycobacterium_tuberculosis
+ |Onchocerciasis
+ |Pneumonia
+ |Rotavirus
+ |Sleeping_sickness
+ |Strep_throat
+ |Typhoid_fever
+ )
+=>
+ (retract ?adr))
+
+(defrule MAIN::symptomHaematuria "Presence of blood in urine"
+ (symptom Haematuria yes)
+ ?adr <- (disease ?
+ Bacillary_dysentery
+ |Hepatitis_A
+ |Hepatitis_B
+ |HIV-1
+ |Influenza
+ |Measles
+ |Meningoencephalitis
+ |Mucocutaneous_leishmaniasis
+ |Mycobacterium_tuberculosis
+ |Onchocerciasis
+ |Pneumonia
+ |Rotavirus
+ |Sleeping_sickness
+ |Strep_throat
+ |Typhoid_fever
+ |Yellow_fever
+ )
+=>
+ (retract ?adr))
+
+(defrule MAIN::symptomConjunctivitis "Inflammation of the conjunctiva of the eye"
+ (symptom Conjunctivitis yes)
+ ?adr <- (disease ?
+ Bacillary_dysentery
+ |Dengue
+ |Hepatitis_A
+ |Hepatitis_B
+ |HIV-1
+ |Influenza
+ |Malaria
+ |Meningoencephalitis
+ |Mucocutaneous_leishmaniasis
+ |Mycobacterium_tuberculosis
+ |Pneumonia
+ |Rotavirus
+ |Schistosoma_haematobium
+ |Sleeping_sickness
+ |Strep_throat
+ |Typhoid_fever
+ |Yellow_fever
+ )
+=>
+ (retract ?adr))
+
+(defrule MAIN::symptomSuppurative_otitis_media "Inflammation of the middle ear with purulent discharge"
+ (symptom Suppurative_otitis_media yes)
+ ?adr <- (disease ?
+ Bacillary_dysentery
+ |Dengue
+ |Hepatitis_A
+ |Hepatitis_B
+ |HIV-1
+ |Malaria
+ |Meningoencephalitis
+ |Mucocutaneous_leishmaniasis
+ |Mycobacterium_tuberculosis
+ |Onchocerciasis
+ |Pneumonia
+ |Rotavirus
+ |Schistosoma_haematobium
+ |Sleeping_sickness
+ |Strep_throat
+ |Typhoid_fever
+ |Yellow_fever
+ )
+=>
+ (retract ?adr))
+
+(defrule MAIN::symptomAcute_confusional_state "Transient disorder of cognition and attention accompanied by disturbances of the sleep-wake cycle and psychomotor behavior"
+ (symptom Acute_confusional_state yes)
+ ?adr <- (disease ?
+ Bacillary_dysentery
+ |Dengue
+ |Hepatitis_A
+ |Hepatitis_B
+ |HIV-1
+ |Influenza
+ |Measles
+ |Mucocutaneous_leishmaniasis
+ |Mycobacterium_tuberculosis
+ |Onchocerciasis
+ |Pneumonia
+ |Rotavirus
+ |Schistosoma_haematobium
+ |Strep_throat
+ |Yellow_fever
+ )
+=>
+ (retract ?adr))
+
+(defrule MAIN::symptomHaemoptysis "Coughing up of blood"
+ (symptom Haemoptysis yes)
+ ?adr <- (disease ?
+ Bacillary_dysentery
+ |Hepatitis_A
+ |Hepatitis_B
+ |HIV-1
+ |Influenza
+ |Malaria
+ |Measles
+ |Meningoencephalitis
+ |Mucocutaneous_leishmaniasis
+ |Onchocerciasis
+ |Rotavirus
+ |Schistosoma_haematobium
+ |Sleeping_sickness
+ |Strep_throat
+ |Typhoid_fever
+ |Yellow_fever
+ )
+=>
+ (retract ?adr))
+
+(defrule MAIN:Solution "Answer what disease is"
+ (declare (salience -10000))
+ (disease ? ?sol)
+=>
+ (open "logfile.txt" logfile "a")
+ (printout logfile ?sol crlf)
+ (close logfile))