% % $Id: hekate_case_health-rt.pl,v 1.2 2009-11-24 11:01:49 kinio Exp $ % % File generated by HeKatE Qt Editor ver. M6_10 % % HeaRT case % % % Copyright (C) 2006-9 by the HeKatE Project % % HeaRT has been develped by the HeKatE Project, % see http://hekate.ia.agh.edu.pl % % This file is part of HeaRT. % % HeaRT is free software: you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation, either version 3 of the License, or % (at your option) any later version. % % HeaRT is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with HeaRT. If not, see . % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% :- ensure_loaded('heart.pl'). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TYPES DEFINITIONS %%%%%%%%%%%%%%%%%%%%%%%%%% xtype [name: boolean, base: numeric, length: 1, scale: 0, desc: boolean, domain: [0,1] ]. xtype [name: integer, base: numeric, length: 10, scale: 0, desc: integer, domain: [-2147483648 to 2147483647] ]. xtype [name: default, base: symbolic, domain: [none/1], ordered: yes ]. xtype [name: tAllergics, base: symbolic, desc: 'The types of allergics of the patients', domain: [penicillin,none] ]. xtype [name: tAge, base: numeric, length: 3, scale: 0, desc: 'The age of the patients ', domain: [0 to 150] ]. xtype [name: tWeight, base: numeric, length: 5, scale: 2, desc: 'The weight of the patients ', domain: [0.00 to 999.99] ]. xtype [name: tDiagnosis, base: symbolic, desc: 'The types of diagnosis ', domain: ['AcuteSinusitils'] ]. xtype [name: tMedications, base: symbolic, desc: 'The names of drugs prescribed by doctor', domain: ['Amoxicillin','Cefuroxime','Levofloxacin'] ]. xtype [name: tCreatinineLevel, base: numeric, length: 4, scale: 2, desc: 'The type of the medical factor', domain: [0.01 to 15.00] ]. xtype [name: tCreatinineClearance, base: numeric, desc: 'The type of the second medical factor ', domain: [-2147483648 to 2147483647] ]. xtype [name: tDose, base: symbolic, desc: 'The amount of the drug prescribed by a doctor ', domain: ['NotKnownYet','500mgEvery24hoursFor14days','250mgEvery24hoursFor14days'] ]. %%%%%%%%%%%%%%%%%%%%%%%%% ATTRIBUTES DEFINITIONS %%%%%%%%%%%%%%%%%%%%%%%%%% xattr [name: age, abbrev: age, class: simple, type: tAge, comm: in, desc: 'an age of the patient ' ]. xattr [name: allergic, abbrev: aller, class: simple, type: tAllergics, comm: in, desc: 'an allegic of the patient to medicaments ' ]. xattr [name: creatinineClearance, abbrev: creat, class: simple, type: tCreatinineClearance, comm: inter, desc: 'the second of the medicals factors, that can be calculated with the help of creatinineLevel factor' ]. xattr [name: creatinineLevel, abbrev: crea2, class: simple, type: tCreatinineLevel, comm: in, desc: 'one of the medicals factors' ]. xattr [name: diagnosis, abbrev: diagn, class: simple, type: tDiagnosis, comm: in, desc: 'an diagnosis made by a doctor' ]. xattr [name: dose, abbrev: dose, class: simple, type: tDose, comm: out, desc: 'the amount of the drug prescribed by a doctor' ]. xattr [name: medication, abbrev: medic, class: simple, type: tMedications, comm: inter, desc: 'the name of the drug prescribed by a doctor ' ]. xattr [name: weight, abbrev: weigh, class: simple, type: tWeight, comm: in, desc: 'a weight of the patient ' ]. %%%%%%%%%%%%%%%%%%%%%%%% TABLE SCHEMAS DEFINITIONS %%%%%%%%%%%%%%%%%%%%%%%% xschm 'Table1': [diagnosis,allergic,age] ==> [medication]. xschm 'Table2': [age,creatinineLevel,creatinineClearance] ==> [dose]. xschm 'Table3': [age,weight,creatinineLevel] ==> [creatinineClearance]. %%%%%%%%%%%%%%%%%%%%%%%%%%%% RULES DEFINITIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%% xrule 'Table1'/1: [diagnosis eq 'AcuteSinusitils', allergic eq none, age gt 17] ==> [medication set 'Amoxicillin'] :'Table2'. xrule 'Table1'/2: [diagnosis eq 'AcuteSinusitils', allergic eq none, age lte 17] ==> [medication set 'Cefuroxime']. xrule 'Table1'/3: [diagnosis eq 'AcuteSinusitils', allergic eq penicillin, age eq any] ==> [medication set 'Levofloxacin']. xrule 'Table2'/1: [age lt 15, creatinineLevel eq any, creatinineClearance eq any] ==> [dose set 'NotKnownYet']. xrule 'Table2'/2: [age gt 60, creatinineLevel eq any, creatinineClearance eq any] ==> [dose set 'NotKnownYet']. xrule 'Table2'/3: [age in [15 to 60], creatinineLevel lte 1.40, creatinineClearance gt 50.0000000000] ==> [dose set '500mgEvery24hoursFor14days']. xrule 'Table2'/4: [age in [15 to 60], creatinineLevel gt 1.40, creatinineClearance lte 50.0000000000] ==> [dose set '250mgEvery24hoursFor14days']. xrule 'Table3'/1: [age eq any, weight eq any, creatinineLevel eq any] ==> [creatinineClearance set 140.0000000000-age*weight/creatinineLevel*72.0000000000] :'Table2'. %%%%%%%%%%%%%%%%%%%%%%%%% STATES DEFINITIONS %%%%%%%%%%%%%%%%%%%%%%%%%% xstat init0: [age,10]. xstat init0: [allergic,penicillin]. xstat init0: [diagnosis,'AcuteSinusitils']. xstat init0: [creatinineLevel,2.00]. xstat init0: [weight,50.00]. xstat init1: [age,18]. xstat init1: [allergic,penicillin]. xstat init1: [diagnosis,'AcuteSinusitils']. xstat init1: [creatinineLevel,2.00]. xstat init1: [weight,50.00]. xstat init2: [age,10]. xstat init2: [allergic,none]. xstat init2: [diagnosis,'AcuteSinusitils']. xstat init2: [creatinineLevel,2.00]. xstat init2: [weight,50.00]. xstat init3: [age,17]. xstat init3: [allergic,none]. xstat init3: [diagnosis,'AcuteSinusitils']. xstat init3: [creatinineLevel,2.00]. xstat init3: [weight,50.00]. xstat init4: [age,10]. xstat init4: [allergic,penicillin]. xstat init4: [diagnosis,'AcuteSinusitils']. xstat init4: [creatinineLevel,2.00]. xstat init4: [weight,50.00]. xstat init5: [age,10]. xstat init5: [allergic,penicillin]. xstat init5: [diagnosis,'AcuteSinusitils']. xstat init5: [creatinineLevel,2.00]. xstat init5: [weight,150.00]. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % File generated by HeKatE Qt Editor ver. M6_10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%