 So, program rules is one of the most important concepts in creating tracker programs. So, it's kind of interesting but a little different from what we have already learned. So, but if you grab the concept clearly then it would be easy to use this facility in your programs. So, we'll be seeing today how to practice the program rules concept and what are the steps to consider when creating a program rule, and then how to create program rules using variables, expressions, and actions. So, I'll try to go slow so that everyone is on the same page and can grab the concepts easily. So program rules, they provide a dynamic behavior in user input apps, that is the tracker capture and the event capture apps. So, when you create program rules in your program, once a person enters data using a tracker capture, then he or she can see this dynamic behavior depending on the person's activity, that is what he does in the user interface. So, the activity happens when you're entering data or when the interface of the data entry changes. During data entry, the program rule expressions are evaluated. So, each time somebody enters data changes the value in a in the related data element or attribute. The program rule is validated, and then the action is executed. We'll see few examples of these program rules so that you can understand what these program rules actually does. So, I'll go to the demo instance. So, this is the demo instance. I will show a few program rules already customized in this instance, so that you can see what these program rules actually do. As I mentioned, these activities happen in the data entry user interfaces, that is, tracker capture and event capture. So, I'm going to go to tracker capture because we are working with tracker instances. And I'll start with the TB program which is customized in our instance. So, the TB treatment card app. So, we already have few people registered in the program but I will start registering a new person so that I can show you a few program rules in action. So, I go to click register and this is the page you get to register a new person into the TB treatment card program. So, I'll type the name first, say Chris, so we'll put sex. Then you can see here the date of birth and age both fields are in the data enrollment page. So, just see what happens when I enter the date of birth of this person. I will say it was born in 1972, February, March. Now you can see the age field is already filled. It's already calculated. So, this happened because of a program rule running behind. So, I changed the value of the date of birth. It automatically calculated the age and displayed in the attribute age. So, that is one example of using a program rule in this program. So, I will save this person and go to the dashboard and see what other program rules are in action in this TB control program. Save and continue. Now I'm moving on to the dashboard of this person. So, you can see the first stage, initial diagnosis stage is already open and you can see some data elements without any data values. And if you see on the top bar, you can see the TB registration number, the first name, last name, sex and the patient's age. So, on the initial diagnosis stage, the first section that I'm going to fill this patient's information. So, patient's TB, patient's type, I'll put this as a new patient. Then the system is asking for the site of disease. So, tuberculosis can be pulmonary or extra pulmonary. So, that means it could be in the lungs or outside the lungs. So, if I select pulmonary, so this patient has pulmonary TB, tuberculosis in the lung, so I'm selecting pulmonary. So, if I go to the top bar, now you can see another label, another text field is appearing here. The TB disease site equals pulmonary. So, this was not present when we enrolled the patient, but when we entered the patient's disease site, this appeared. So, it's a dynamic behavior which was triggered by the change of the value of this data element. So, let's change this to extra pulmonary now. I'm changing the TB disease site to extra pulmonary. Now you can see two changes. I hope you have noticed that an additional data element for the EP-TB site, that is extra pulmonary TB site, appeared below the TB disease site data element. And also, the text on the top bar also changed. Now the TB disease site is extra pulmonary, so it automatically changed. So, I'm going to select the patient's EP-TB site. So, now the patient is not having TB in his lungs, but having TB somewhere else. Let's say joints and bones. So, now patient's TB site is extra pulmonary and it's in the joints and bones. Now, let's say I made a mistake by putting the extra pulmonary, but I'm going to change it. I have to change it back to pulmonary. Let's see what will happen. I'm changing this to pulmonary now. And there's a message popping up. EP-TB site was blanked out and hidden by your last action. So, when I click OK, the EP-TB site was hidden again. So, there was a value, now it's blanked out and now it's back to pulmonary. So, this is one common example where you use program rules as a skip logic in your data entry interfaces. So, now you have seen three instances where program rules have been used. Let's see another instance in the same program. So, if I go further down, I can see there's a field data element for weight entering the patient's weight. And it says the label is weight in kilograms. So, let's enter some weight and see, let's say this patient is 75 kilos. He accepted the weight and nothing happens. It just turned green. So, let's say by mistake, somebody forgot the 7 and entered 5. Now, there's a message popping up. It's kind of warning message saying this weight value is likely out of range. So, weight of this patient, we have said it's 5 kilograms. The system is displaying a message saying that it's likely out of range. So, now we have to correct our weight. Let's put something in the other extreme, let's say 150. Still, the message is there because we have defined a likely range for the weight. In this program rule, we have defined weight to be more than 5 kilos and less than 140 kilos. So, that is defined by the person who customized the system. So, that's not a hard and fast rule. You can decide whatever range you want and give a warning that this could be out of the range. So, let's say 139 now. So, you can see the warning message goes out because now the weight I have entered is within the range. So, this action is showing a warning is also done using a program rule. So, now in this program TV program, I showed you four instances where a program rule has been used. One, in calculating the age from the date of birth. Two, displaying a value from the data element on the top bar. Three, hiding a field depending on the value of the TV patient's disease site. Four, giving a warning message depending on the weight value entered. So, let's go back to the, to another program, the antenatal care program and see what type of program rules are available there for us to see. So again, I'm going to register a mother into the antenatal care program. So, this is the enrollment registration page. You can see and see registration the last menstrual period, insurance number, first name, so I will put some data here. First name, let's say last name Williams. Now, again, I have the field to enter date of birth. So, I will enter this 2007 March 2nd. So, automatically again the age calculated and it's 14 because the lady, the mother was born on 2007 and it also displays that it is a high risk pregnancy. Because the age is less than 16 years. So, this change of value in the attribute triggered two actions. One is displaying the age after calculation and two, giving an error message. So, we'll ignore the error and go to register this patient. So, I'm going to save and continue. So, now you can see the dashboard, recommended dashboard of the mother enrolled into the antenatal care program. So, on the enrollment widget, I have the registration date and the last menstrual period date, which I didn't change initially. Now, I'm going to change this into say 2021 December 30th. So, her last menstrual period was on December 12th and she was enrolled into the program today. So, now, if you can see, if you can go through the dashboard, you have the enrollment widget then track entity tabular data interface, which has ANC registration which we still didn't create any events. Then on the left on the right side, you have the feedback widget, which is no feedback success, then the profile widget and few other widgets. Now, I'm going to add her first ANC visit. So, she's coming to the clinic today. So, I've added her first ANC visit as today. So, automatically, you can see a change in the interface on the feedback widget. So, on the feedback widget, her gestational age is automatically calculated. So, it's at the first ANC visit, her gestational age is four weeks. This one we didn't enter, but we entered the last menstrual period and we created the first visit for today and the system automatically calculated the gestational age using a program rule. So, that is one example of another program rule. So, in the pregnancy, pregnancy history of the ANC registration, so I'm going to fill some details here. There's pregnancy history, you put the gravity. I think this was explained earlier, but if anybody missed it, the gravity means the number of times that that woman was pregnant. In the, even in the, from the history and including the current pregnancy, the number of times that the woman has been pregnant. So, let's say this woman had a previous pregnancy also. And now this is a second pregnancy, let's put two here. And now automatically you can see another field appeared for parity. So, parity is defined as a number of times she has given birth to a fetus or baby with the gestational age over 24 weeks, 24 weeks or more. So, the fetus, if it survived over 24 weeks or more and she gave birth, whether it was a stillbirth or a live birth, the number is calculated. So, this lady had one previous pregnancy and current pre, current pregnancy. So, parity we can enter because she already had a past pregnancy. So, if she, if her past pregnancy outcome was a live fetus or a delivery after 24 weeks, her parity is one. But if this is her first pregnancy, her parity should be zero because she has not delivered any children before. So, let's change to gravity into one. And automatically you see a message parity was blanked out and hidden by your last action, and you cannot see the field to enter parity. So, that is also done using a program rule. So, in this program, the antenatal program now we have seen three program rules one for calculating the age and displaying a warning if it's high risk pregnancy less than 16 years. And the second one to calculate the gestational case and display in the feedback picture. Third one is to hide the field for data entry field for parity, depending on the value of gravity. So, now you have seen how the same the use of these program rules. So, let's see how we how to create this program rules. So, where should, where can I create this program rules so when creating the metadata you usually go to maintenance app. And if you go to the maintenance app, you can see under program program rule and program variable two components are there. So, for create to create these programs, I will log into the customized customizing app for customizing instance. Look out of this demo instance customization instance, like to maintenance app, then program tab. So, under those you can see program rules and program variables. So, you can see already a few of you have started creating program rules and program variables so let's see how to create these components in a program rule. So, I'm going back to my presentation. Program rules. So, most of most types of action will take effect immediately when the user enters values in the tracker capture and capture. So, once the user enters a value or changes a value in a data element or an attribute the program rule action will be initiated. So, when creating rules program rules, you have to think of these three components. So, you have to think here, customize these three components configure these three components when creating a program rule one is the variable, then the expression and that one is the action. So, we'll start with variables. So, what is the program rule variable? The program rule variable it represents the attribute and data and attribute or data element value which will be evaluated as a part of expression. In the system we enter attribute values and data element values, but when you are creating program rules you have to get these attribute or data element values into a variable which is kind of an intermediate vehicle to when you are creating a program rule. When you change the attribute or the data element value, the change occurs also in the variable which you create and then this variable is evaluated to trigger the action. So, the variables are kind of a pointer. It points to the attribute or to the data element which should be evaluated. In these variables, they create a uniform way to include these data values and attributes because if you can't just point to a data element because it has other dimensions also. One data element, the value can change depending on the stage of the program. So, that's why there is an intermediate variable so that program rules can check these variables. So, it won't have this any conflicts. It will have the proper value to evaluate. So, this program rule variable is defined by the person who is designing the system and they are used in these expressions. Once you create a program rule variable, it is available for any rule you create in the program. So, it's shared between within your program. So, you create a program rule variable for your program and then you sit in a program rule and you can also use it in another program rule. So, it's common to the program. And in summary, so when you the program rule variables, they create a unique reference or a pointer to show to identify where to check the data. When you are evaluating the expression to trigger the program rule action. You will understand this more when you when we create program rules. So, keep in mind the variables they link to usually the attribute or the data element. For example, let's say you want to do some action in the data entry interface depending on the sex of that person. You want to display whether the patient is pregnant as display the data element whether the patient is pregnant only for emails. So, you have to capture the attribute sex to your expression. So, how do you capture this attribute value you capture it through a program rule variable. So, go back to the demonstration and see how to create a program rule variable. So, I'm going back to my customized instance, and I'm in my program rule variable management tab. So, that by creating the TV program rule, which we saw in action at the beginning, where you hide the site for extra pulmonary TV, depending on whether the patient site of TV is pulmonary or extra pulmonary. So, first thing you have to do is you have to work out in your mind, how your program rule behaves. So, this program rule, if you think of it in your mind, it should capture whether the patient's TV site is pulmonary or extra pulmonary. And if it's pulmonary, you have to hide the extra pulmonary site data data element. But if it's extra pulmonary, then you should show that EPTB site capturing data element. In this part, you have to configure in mind and identify what is the program rule variable here and what is the expression you have to design and what is the action. So, let's start with the program rule variable. So, in this variable, I think you have already figured out that you have to capture the site of the TV disease in that patient. So, I'm going to create a program rule to capture that. So, if I start from the beginning, I go to maintenance app, then go to program tab, then program rule variable. Then I'm going to create one program rule variable using the plus icon. So, first thing you have to select is your program. So, as I mentioned earlier, these variables are also linked to a program so that you can use it in any program rule within that program. So, I'm going to select the TV program which we have here, the TV treatment card. So, this is my program. So, you have to give a name for this program rule variable. So, this name you have to keep in mind because it is what is later used in your expression. So, let's give your program rule variable a name. Say TV site, I'll add one word for current. I will explain why I have added this later. So, I'm naming this as TV site current. So, next there is an option to click whether you want to use codes for option sets. So, when you are configuring option sets, you have a name and also you have a code. So, you can use either of these to be used here. So, I will just skip it because I know both codes and names are similar in this TV site option set. It has pulmonary and extra pulmonary as names and also as codes. So, next is source type. So, if I click this, I see six options here. So, we will go through these options in detail later, but I will just select data element in the current event. So, usually you configure these program rules as key projects. So, the data element in the current event is what you capture. So, you will understand this when we see the other options also later. So, at the moment I'm going to select data element in the current event. So, the data element which will capture in the currently open event. Click data element in the current event. And then you get the option to select which data element should be linked to your program rule variable. So, I figured this in my mind that it should be linked to the TB site. See TB disease site. So, this is the element which captures whether the patient is pulmonary or extra pulmonary. So, don't confuse with this TB, EP-TB site. The disease site is whether it's pulmonary or extra pulmonary. And EP-TB site is if it's extra pulmonary which site. So, I want to check this whether the patient is a pulmonary or extra pulmonary patient. And depending on that, I have to hide the EP-TB site element. So, I'm going to select disease site here and I'm going to save this now. So, I have my program rule variable here. So, my first step is done. So, let's go back to the presentation and see what our next step is. So, we have created the program rule variable to capture the data element value of TB site. Next, we have to build our expression to evaluate for the system to evaluate. So, when you enter data or change a data value, the expressions we have defined will be evaluated. So, each time when the user interface is displayed and each time when a data element is changed, the expression will be evaluated. And the action will be triggered. So, most of the actions will be immediate. For example, hiding the data element like in skip logic. So, most of the actions will take effect immediately. So, these building expressions are done using the program rule variables which we created. And there are additional things which we can use to build these program rule variables like operators, there are static values, functions which we will see. So, there are program rules, there are operators. So, these are also, if you want details we can see in the user manuals I will show you later. So, what you have to create is this program rule expression. So, these are few examples of expressions. So, first one, you can see trained adolescent health staff more than facility staff. So, it will assist if there are most staff in trained in the adolescent health then staff then staff within the entire facility. So, likewise you build can build your own expression. The second one, vaccine doses are equal or more than zero and vaccine doses are equal or less than four. So, if you build your expression like this, it will assist the number of vaccine doses whether it's greater than or equal to zero and less than or equal to four. So, another one sample type equals plasma or sample types equal sputum and sex equals. So, these are three examples which somebody has built as expressions in program rules. So, let's think of our expression. What should our expression be? So, I'm going back to my maintenance app and I'm going to create my program rule now using the program rule variable which I created. So, going to program rule and going to click a new program rule. So, first step, you have to enter program rule details. First thing you have to select the program. So, my program is TB program, TB treatment card. Then, there is an option whether to trigger rule only for a certain program stage. If your use case needs that you can use it but I'm not going to use this at the moment. Then you have to give a name for your program rule. So, my program rule, I can give some name, let's say, EPT display, EPT display, EPTB site or maybe shoot the other way to make it more clear. Let's say EPTB site or monary and give any name you want and then you can give a description of what this program rule does. So, this one is important because if somebody later looks at the system, she will understand what this program rule does. So, I will type a description of this but my program is program rule is doing. So, it will hide EPTB site when the disease site is a monary. If I can stop it here or I think more of my rule, I can add another part here. So, this EPTB site should be hidden when the site is pulmonary or if there is the site is not defined yet also you can hide it. I will show you how this happens but at the moment I will name it as the site is pulmonary or blank, let's say. Then you can define a priority so that you give an order of the program rules for the system to evaluate. So, if you give priority one then it will be evaluated first. I am not going to give a priority here, priority order here. Then next one is entering the program rule expression which we discussed now. So, I am going to program rule expression. So, here we have to give the expression for the system to validate. So, we can build this expression using different components. On the left you can see, sorry, on the right you can see there are three options. One is built-in variables. So, these variables are built-in so you can use them. So, there is good documentation on this in the user guide. We will see that later. So, there is current date, event date, due date. So, you can use any of these built-in variables for your program rule expression. Then there is another group called variables. So, this is where you get the program rule variables you have created. So, you can see the TB site current, the program rule variable which I created is displayed here. Then there are few functions. So, built-in functions, again you can read more about this in the documentation. So, we will go through a few of these later. So, you can use these functions also. You can see we have the days between, weeks between, then count functions, as value functions. So, a lot of useful functions are here. So, apart from these, you have the normal operators, the mathematical operators here. You have the plus, minus, multiplication, division, those percentages, less than, greater than, marks, then equals, not equals. And the three logical expressions not hand-on. So, you can use any of these in your expression. So, now I'm going to build my expression. So, my expression should evaluate whether the site of disease is pulmonary or blank. So, if it's pulmonary or if it's blank, then system should trigger the action of hiding the IPTP site data element. So, I'm going to build my expression now. So, I have already made a program rule variable to capture the patient's TB site. So, I'm going to click this and bring it into my condition. So, you can see my expression TB site current. So, it has captured here. And then first condition is I'm checking whether it's pulmonary. So, I will put equals then pulmonary. So, you have to be careful of your spelling because it will evaluate the name and if you are using the name, the name spelling should be correct. And if you are using the option set code, the code should be correct. So, if it's, you have to also put this in single codes. There's some, maybe internet issues or it's not the expression, checking the expression. So, I will move forward. So, one component I have built in my expression and there is another component. So, I have to check whether it is empty also. So, even if the patient's TB site is empty, still I want to hide the IPTP site. So, my expression I am putting the logical operator or then TB site current, then if it's equal to empty. So, two codes. So, this is how you define empty. So, let's save this for the moment. So, I'm opening it again. So, I have entered the program rule details, selected the program, gave a name and gave a description and created my program rule expression. So, usually this on the bottom of the expression, it should display the expression in simple terms after evaluating and it's not showing, not sure whether it's an issue with the instance. So, let's move forward. So, we have created the program rule expression. So, it's clear now whether TB site of TB is pulmonary or site of TB is blank. I can argue this in the other way also if using the not operator, so you can say if site is not extra pulmonary, you can hide it also. So, that way also one can build it but rather than using negations, we prefer to use these types of expressions. So, it will evaluate to the same expression. Right. So, I have done two steps. So, my third step is defining the program rule action. I'll go back to my presentation. So, third step is program rules actions. So, once the program rule expression is evaluated, then it triggers the action. So, if the expression is evaluated to be true, then the actions attached to the rule is initiated. Each program rules should have one or more actions attached to it. And these are behaviors that are triggered in the user interface when the expression is true. So, if the expression is evaluated true, the actions are triggered. So, actions will be applied at once if the expression is true and it will also revert if it's false again. So, if it's no longer true, the action will be reversed. So, there are several types of actions which we will see. So, in summary, you create program rule, you enter the details, then the expression, then the action. So, let's see how to configure the action component. Going back to my program rule. So, the last component is defining the program rule action. Go back to the EPTB height pulmonary. So, this is the expression. And then define the program rule action, the third component. So, here we don't have actions configured at the moment. So, I'm going to add one action here. So, if you click this, you can see a list of actions which can be used in our program rule rules. So, one is assign value, display key pair. So, a lot of things which we will discuss later. So, at the moment, the action I want is to hide the EPTB field. So, that's the option to hide field. If I click this, it will ask which data element to hide. Simple. So, I'm going to select EPTB site. It will also ask there are options to hide the identity attribute if you want. And also, there is a place to customize your message. I have shown you the message which appeared when the program rule action took place. So, you can give a customized action also. So, I'm not going to customize that at the moment. I'm going to click hide field and hide EPTB. So, I'm going to commit this. So, I'm going to save this now. So, my program rule is saved. If I go back, I have the details, selecting the program, then name, description, then the expression, which I give as if EPTB site equals pulmonary or EPTB site equals none, then define action hide field. Let's see whether this program rule is working. So, to select, to check whether the program rule is working. One thing you have to do is to clear the cache. So, always remember to clear cache before testing any changes in your program rule. To clear my cache, I'm going to track a capture, load my EPTB program, EPTB treatment card. So, I will register a patient person here. Enter the identity dashboard and I can, if I go to the EPTB site, I cannot see the EPTB site at the moment. So, let's try extra pulmonary. So, when I click extra pulmonary, I can see the EPTB site now. So, if I click pulmonary again, it is disappearing. So, my program rule is working. So, let's put the EPTB site also and see let's say it's plural EPTB, but then change it to pulmonary. So, my message is coming, EPTB site was blanked out and hidden by your last action. So, that program rule which we created worked fine. So, I'll go through the presentation, back to the presentation again. So, this is a summary of what we did. We created, first we created the program rule. When creating the program rule, so first we created the program rule variable. Just as the steps in program rule creation, we entered the details of the program rule and the expression and the action. So, in summary, the steps for creating a program rule. So, first thing you have to conceptualize in your mind what this program rule should do. So, the logic you have to decide before creating. So, keep it in your mind, maybe you can put it down, draw it. And so, the important things you have to think of is what data element or attribute should I capture and evaluate and then how should I evaluate. And after evaluating what is the action that should do. So, create the program rule variable to capture that data element or attribute actually to point to that data element or attribute. So, then create the program rule. So, first thing select the program then give a name, give a good description. And if there is a priority you can assign it. And then enter the program rule expression using the program rule variables. And functions, the mathematical operators. So, there are different different things which you can use to create expression and then finally create the program rule action. Which you want and most importantly clear the cache before testing. So, what I will do is I'll give you 10 minutes. To create the EPTP hiding program rule in your TB treatment program. And you can ask if there are any questions in the slack if you come across creating this EPTP program rule. So, you can also refer to the learner guide and go step by step. So, once you create your first successful program rule then the next steps I see so that it's only defining your logic and creating it. So, we'll have a 10 minute break. It's not actually break so you can practice the first program rule create in the first program rule and we'll come back in 10 minutes. We should give a warning not an error warning so that that person who is entering the data will think whether this is a mistake. And if it's a real mistake he or she will correct the mistake. So, most probably we think that weight should be falling into this stage but there could be extremes of people more than 140 kilos. So, that's why we are giving a warning not an error. So, I'm going to maintenance app. So, just a refresher of what other steps so first you create the program rule variable to capture the data value to point the data value to weight. Then you use that program rule variable in our expression. And there you give the range 140 and five and build our expression and then assign the action that is giving a warning. I'm going to program here and program rule variable so already a lot of program rule variables have been created. So, I will create a program rule variable for the DB treatment card weight data element to show and show a warning. First step creating a program rule variables for my program rule variable will be assigned to be treatment card program. So, I have to give a name. Since there are many variables already created I have a prefix of DHS to DHS and then write weight. Nobody else has used DHS as a prefix. All right, so I'm not, I don't have an option set for the weight so no need to take that anyways. So source type. So, it should be data element in the current event. So, when you're entering data you're opening that event and the warning should be in the current event. So, I'm giving, I'm selecting data element in the current event. And my data element would be weight in kilograms. So, now I have the pointer, the program rule variable pointing to the weight of the person. So, I'm going to save it. Then next I'm going to program rule. I'm going to create a program rule to give a warning for weight. Start from the beginning. So, my program, TB treatment card. And I have to give a name. So, I'll give a name again. I'll put the prefix CHI so that we can identify it later if we want. And let's say my program rule has weight. Out of range. And description. Like if I have to give a good description. This play. Morning. If it is of range. We can put our range by 2140. Then we are building our program rule expression. So, we have to use the pointer which we created for weight. So, it should be in the variable. So, I have to build my expression. So, now I'm thinking in my mind how to build my expression. So, in the expression there will be many parts. One is it should be if it is less than or equal to five, I'm giving a warning. Or if it's more than or equal to 140, I'm giving a warning. There should be another condition. So, if the weight data value is empty, then I should not be giving a warning because it's still not filled. So, I'm adding another part to the condition. So, my data, the weight, there should be a value. So, now I'm again rephrasing my expression. So, if the data weight has a value and if it's less than or equal to five or more than or equal to 140. So, that I think will be a good expression for me. So, how do I get this? Check whether this variable has a value. For that, we have a list of functions here. And if you go down, one of the functions is has value. So, if I click this and it says has value and here you have to give the source field. So, my source field is my variable. So, I'm going to delete this source field and replace it with my program rule variable, which is DHIS weight. So, now this checking part is working back now. So, I can see I have a valid expression now and it is weight in kilograms. So, it checks whether this weight data element has a value. And next time building my other components of the expression. So, I have two other components. One is whether it's equal or less than to five and whether it's greater or equal to 140. So, I'm getting back my pointer. So, before that, I have to use the logical expression. So, if on this side, if it has a value and on this side it compares with the value. So, these both should be true for my expression to be true. So, what my logical expression should be is AND. So, my, now the weight with the check checks whether it weight has a value and whether that value is less than or equal to five. And there's another component. It should be less than or equal to five or it should be more than or equal to five. So, I'm putting that part also weight more than or equal to 140. So, I have a correct equation now but is it actually correct? So, will this evaluate to what I really want? It says D2 has value whether it has a value and whether it's less than five and sorry it's then again so it's less than sorry more than 140. But what I want is to evaluate these two together not in this order. So, I have to be careful and use the brackets here. So, it should evaluate whether this or this against this. So, whether the weight is less than or equal to five or more than or equal to 140 and this has a value. So, if it has a value and this part. So, I think using the bracket here it's clear for you. Otherwise, if he evaluated in this order without the bracket then first part will be evaluated then and this part will be evaluated or then this will take hold of this side as one argument and it will evaluate or against this one. So, the argument we want will not be what really we have we are expecting. So, now I have a valid argument so, but you have to keep in mind is putting the brackets in the correct places. Right, so next now I have the program rule expression, then I'm going to define my program rule action. So, my action is I need to display a warning. So, remember there are two things one is this giving an error one is giving an warning. So, if you give an error that person has to correct it. But if you give a warning, that person can ignore it. So, still, the person will think what I have entered the way that I have entered is right and proceed. So, I'm going to put the action. So, I'm going through the list. There is an error on complete which is not what I want. It is there schedule and show error. This is also not what I want I want to show a warning not an error. I'm going to select show warning. So, once as I mentioned if you put show error, it should be corrected the value should be corrected but if you if it's a warning you can ignore it. So, show warning when I click it, it will display another box. Then you can select data element to display warning next to so this will define where the warning is displayed. So, warning is better if you display it to the it next to the data element where you think there could be an error so that the data entry person it's easy for him or her to correct it. So, I want to display this warning next to my weight data element. Then, if you want it to display against an attribute this is the option. Then you can build your error sorry warning message. So, you can put a static text, or you can again put a dynamic test text using the variables and functions but I will just put a static text saying that my weight is out of range. You can define whatever message you want. You can just say is likely let's say likely to be out of range. It's likely to be out of range so it could be out of range it could be correct. So, I'm going to commit it. So, now I have configured my program rule. I went to the details and the expression and the action. I'm going to save it. So, my program rule is saved correctly next step. You can test it if you want then remember to clear the cache because data entry interfaces has a lot of cash stored in the browser. So, I'm going to take a capture then going to my program to be treatment card. So, I can use the same entity which I registered earlier. If you go down. You have the weight here. So, if you enter a weight here less than five. Less than or equal it will save it is likely to be out of range. So, if I say 50. It will accept the weight. If I make this 150. It will again display the morning so my program rule is working as I expected. So that's the second program rule we have created so you can create. This one also practice and what we do is after the break we'll create one in the program and a couple more in the TV program so that you will be familiar. You'll get more experience in creating program rules. I think we wanted to discuss something about the exam. If you can take over.