Algorithm Diagram to Find Rules from Sample Rule Database.



Wrong

Set t=1 week

Set x = first day

Database

Rules

Repeat comparing the data with the rule patterns taken from the database (starting from x )

(t weeks/all weeks taken)

Count duplicates with 10%-20% error.


Wrong

If t> 5 weeks

correct

Repeat with x< x +numberofdays(t)

correct


Call the algorithm to find new rules

correct

If R>= 80%

Sort samples by R,

Accept sample with R max

Wrong

Calculate the ratio R=Number of duplicates/total number of calculations, Save R in the result evaluation table

Increase t=t+ 1 week

Table 4.3 Algorithm diagram for finding rules from rule sample database.

An illustrative example of applying the above two algorithms to find treatment rules: Suppose there are the following two sample rules:

Date order

1

2

3

4

5

6

7

Rule 1 (dosage/day)

1

2

1

2

1

2

1

Rule 2 (dosage/day)

1

1

1

2

1

1

1

Maybe you are interested!

Algorithm Diagram to Find Rules from Sample Rule Database.


The dosage data for a patient under consideration are as follows:


Day

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17


Dose

quantity


1


2


1


1


2


2


1


1


2


1


1


2


2


1


1


2


1

Day

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

Dose

quantity


1


2


2


1


1


2


1


1


2


2


1


1


2


1


1


2


2


1


Apply the rule search algorithm according to diagram 4.3, Recurrence value R (rule 1/data set under consideration)=0/5=0; Recurrence value R (rule 2/data set under consideration)=0/5=0;

The algorithm for finding rules on sample rule data does not converge. At this time, apply the algorithm for finding rules according to diagram 4.2: Get the time series value t=5 days:

Rule 1'

1

2

1

1

2

Recurrence value R (1' rule/considered data set)=1/7=0.143; Take the time series value t=6 days:

Rule 2'

1

2

1

1

2

2

Recurrence value R (2' rule/considered data set)=1/6=0.167; Take the time series value t=7 days:

Rule 3'

1

2

1

1

2

2

1

Recurrence value R (3' rule/considered data set)=5/5=1;


So the chosen rule will be Rule 3' because it has the largest repetition rate in the data set.

4.4. Combination of the above methods

In fact, a patient's treatment lasts throughout their life. Therefore, the use of a combination of dosage prediction methods will be appropriate for each stage of the treatment process. The combination method simulates the long-term treatment process for a patient. The methods of exploration, finding similar cases and finding dosage rules will be applied in turn at each different time of the treatment process, which helps to quickly determine the stable dosage of a patient. And that is also the goal of the problem.

Step 1: in the early stage of the patient: Use the method of finding the most similar sample medical records, build a backbone dosage system.

Step 2: Determine if there is a similar case history. When the method of finding similar cases is effective and used, it must still be combined with the exploration method to rely on the basic system of rules to estimate and adjust the dosage more realistically between the patient's follow-up visits.

Step 3: In case no similar medical record exists, apply the exploratory method.

Step 4: After certain periods of time (1 week, 2 weeks, 1 month, 3 months): apply the method of finding the patient's drug use pattern.

The key to this hybrid approach is the combination of prediction algorithms over treatment time. The goal is to find the most stable treatment solution for the patient. This hybrid approach can improve the system's ability to predict dosage.


New patient case


correct

Wrong

Exist?

Wrong

correct

correct

Wrong

Exist? Exist?

Use method 2: find the best sample medical record

Build the spine dosage based on method 2

Using method 1: calculate dosage according to basic rules

Use method 1: adjust dosage according to basic rules

After each re-examination

Use method 3: Find the treatment rule

Use method 3: Find the treatment rule

Dosage prediction

stable


Table 4.4 Hybrid method algorithm diagram.

Example:

Consider a patient with the following data:



Patient id


age


sex


H.


W.


Operated Date

Risk of Frozen

Blood


Risk of

Me.


Clinical En.


Type of

Waltz


No of Waltz


Region


Epidemic

05-00-









Valve


Region

Hot

10001

22

Male

170

62

2005/4/19

High

High

yes

2

Bac

Slim


This patient's safe INR range is as follows:



Patient_id


Date


INR_Min


INR_max


Basic dose

05-00-10001

2005/9/26

2.5

3.5

2


Sample medical record as follows:



Patient id


sex


age


H.


W.


Operated Date

Risk of Frozen

Blood


Risk

of Me.


Clinical En.


Type

of waltz


No

of waltz


Region


Epidemic


BN1


Male


45


160


43


10/9/2005


High


High

Atrial fibrillation,

Ball mechanics


2


North

Urban


BN2


Male


45


160


43


10/9/2005


Short


Short


history of obstruction

circuit,

Disc Mechanics 1

wing


2


North


Urban


BN3


Female


45


160


43


10/9/2005


High


High


thrombosis

ear,

Disc Mechanics 2

wing


2


North


Urban


BN4


Female


45


160


43


10/9/2005


Short


Short


left ventricular dysfunction

heavy


More mechanics

valve


2


North


Urban


BN5


Male


45


160


43


10/9/2005


High


High



Born

heterologous


2


North


Urban


Step 1: Calculate similar medical records.

Step 2: No medical records are satisfied because the patient entered had a surgery date 5 months earlier than the sample medical record. All similarity measures are not satisfied greater than 0.9.

Step 3: Apply the survey method: The results are returned in the following table:

No

Date

INR

Dose

INR_Pred

Dose_Pred

Err_INR

Err_Dose

05-00-10001

31

2005/10/26

6.38

1

5.88

0

-0.5

-1

05-00-10001

32

2005/10/27

6.38

1

3.5

1

-2.88

0

05-00-10001

33

2005/10/28

6.38

1

3.5

1

-2.88

0

05-00-10001

34

2005/10/29

6.38

1

3.5

1

-2.88

0

05-00-10001

35

2005/10/30

6.38

1

3.5

1

-2.88

0

05-00-10001

36

2005/10/31

6.38

1

3.5

1

-2.88

0

05-00-10001

37

2005/11/1

1.3

3

3.5

1

2.2

-2

05-00-10001

38

2005/11/2

1.3

2

2.5

3

1.2

1

05-00-10001

39

2005/11/3

1.3

2

2.5

3

1.2

1

05-00-10001

40

2005/11/4

1.3

2

2.5

3

1.2

1

05-00-10001

41

2005/11/5

1.3

2

2.5

3

1.2

1

05-00-10001

42

2005/11/6

1.3

2

2.5

3

1.2

1

05-00-10001

43

2005/11/7

1.3

2

2.5

3

1.2

1

05-00-10001

44

2005/11/8

1.3

2

2.5

3

1.2

1

05-00-10001

45

2005/11/9

1.3

2

2.5

3

1.2

1

05-00-10001

46

2005/11/10

1.3

2

2.5

3

1.2

1

05-00-10001

47

2005/11/11

2.86

2

2.86

2

0

0

05-00-10001

48

2005/11/12

2.86

3

2.86

2

0

-1

05-00-10001

49

2005/11/13

2.86

2

2.86

2

0

0

05-00-10001

50

2005/11/14

2.86

3

2.86

2

0

-1

05-00-10001

51

2005/11/15

2.86

2

2.86

2

0

0

05-00-10001

52

2005/11/16

2.86

3

2.86

2

0

-1

05-00-10001

53

2005/11/17

2.86

2

2.86

2

0

0

05-00-10001

54

2005/11/18

2.86

3

2.86

2

0

-1

05-00-10001

55

2005/11/19

2.86

2

2.86

2

0

0

05-00-10001

56

2005/11/20

2.86

3

2.86

2

0

-1

05-00-10001

57

2005/11/21

2.86

2

2.86

2

0

0

05-00-10001

58

2005/11/22

2.86

3

2.86

2

0

-1

05-00-10001

59

2005/11/23

2.86

2

2.86

2

0

0

05-00-10001

60

2005/11/24

2.86

3

2.86

2

0

-1

05-00-10001

61

2005/11/25

2.86

2

2.86

2

0

0

05-00-10001

62

2005/11/26

2.86

3

2.86

2

0

-1

05-00-10001

63

2005/11/27

2.86

2

2.86

2

0

0

05-00-10001

64

2005/11/28

2.86

3

2.86

2

0

-1

05-00-10001

65

2005/11/29

2.86

2

2.86

2

0

0

05-00-10001

66

2005/11/30

2.86

3

2.86

2

0

-1

05-00-10001

67

2005/12/1

2.86

2

2.86

2

0

0

05-00-10001

68

2005/12/2

2.86

3

2.86

2

0

-1

05-00-10001

69

2005/12/3

2.86

2

2.86

2

0

0

05-00-10001

70

2005/12/4

2.86

3

2.86

2

0

-1

05-00-10001

71

2005/12/5

2.86

2

2.86

2

0

0

05-00-10001

72

2005/12/6

2.86

3

2.86

2

0

-1

Patient_id


Step 4: Find the treatment rule. In the above data segment, the patient came for a routine check-up on the last day (No. 72) and the INR test result was still within the safe range (2.86). Applying the rule search method on the patient's data set, using the algorithm to automatically search for the rule, the result returned is as follows:

1

1 1

1

1

1

3

2

Rule 2

2

2

2

2

2

2

2

2

Rule 3

2

3

2

3

2

3

2

3

Rule 1


Repeatability calculation results: R(rule 1)=1/5=0.2, R(rule 2)=1/5=0.2, R(rule 3)=3/5=0.6,


In this case the third rule may exist, and the third rule can be applied to the dosage calculation of subsequent stages, taking into account the patient's next follow-up visit.

In case rule 3 is applied, the dosage calculation for the following days will be based on this rule, that is, on the second day of the week, take 2/8 sintrom pills, on the third day, take 3/8 pills, on the fourth day, take 2/8 pills, on the fifth day, take 3/8 pills, on the sixth day, take 2/8 pills, on the seventh day, take 3/8 pills, on the Sunday:


Patient_id

No

Date

INR

Dose

INR_Pred

Dose_Pred

Err_INR

Err_Dose

05-00-10001

73

2005/12/3



2.86

2



05-00-10001

74

2005/12/4



2.86

3



05-00-10001

75

2005/12/5



2.86

2



05-00-10001

76

2005/12/7



2.86

3



05-00-10001

77

2005/12/8



2.86

2



05-00-10001

78

2005/12/9



2.86

3



05-00-10001

79

2005/12/10



2.86

2




The combination of the above three methods will clearly manifest in the whole process of predicting the patient's treatment dosage:

From day 31 to day 72 of treatment: dosage is predicted by the exploratory method.

From day 73 until the last follow-up visit, dosage was predicted using a treatment rule search method.

However, for this example, the time to apply the dosage rule calculation is too short, so it will only be used to illustrate the method of combining the three algorithms above.

Chapter 5: Building software to test algorithms for predicting anticoagulant dosage


5.1. System design


Module name

Patient information management section


STT

Related Sections



1

Enter general patient data

2

Enter patient's personal status

3

Enter the patient's diet

4

Enter the patient's lifestyle

5

Enter the patient's safe INR range


6

Enter patient's medication regimen





Support for predicting the next dose of medication to take


STT

Related Sections




1

Apply the method of exploration, use

basic fuzzy rules


2

Apply case-based reasoning


3

Apply the rule finding method

patient treatment


4

Apply hybrid method: integrate the above 3 solutions






STT

Related Sections



1

Table of vitamin K content in food

2

Reference medical records table

3

Table of types of artificial heart valves

4

Table of regions

5

Table of regions



Comment


Agree Privacy Policy *