 Right. So what we will do is we'll first do the remaining two program rules for the TB program in our exercises list. So we'll start with exercise four, that is creating a program rule for the TB treatment card to show the disease site in feedback. So earlier one, we used the disease site to show or hide the TBTB site. Now we are using the disease site and showing it in the feedback widget. So I'm going to maintenance. So first step, I have to create the pointer, the program rule variable to the TB site data value, data element value. So I'm going to program, program rule variable. So I already created TB site program rule variable earlier. So this one TB site current, I have created a program rule variable. So if I go through that, it points to the TB disease site, and it is the source is data element in the current event. But now I want to show the value in the feedback widget. So feedback widget is something that is open throughout the tracker entity instance capture events. So it could be in the one first stage or second stage, it could be in any stage. So if I capture the data element in the current event, I might not be able to point it to the exact point because the event currently I have opened might not be having the TB site. So this rule variable which I created earlier might not be suitable for this rule which I'm going to create now because TB program has different stages and under different stages they are kind of different events. So, but my program rule should show the TB site throughout disregard to what the pitch event is open. So I'm going to create a separate program rule variable for this function for this rule. So my program will be the same TB treatment card. So I will give a separate name for this new program rule variable. So I will say TB disease newest, let's say newest. I'm not using the current data value. I'm using the newest element. So how do I select this. So in the source type, we didn't go through all these options we used data element from the current event, but there are many other options actually five other options. So first one is data element from the newest event from a program stage. So as the words say, from a program stage, it will point to the value of the newest stage event. So from one stage if it's a repeatable stage, the newest event will be captured. Next one is data element from the newest event in the current program. So it doesn't mention about any stages, it will capture newest event value point to the newest event value from the current program. So I will use either of these. So if you are, if you want to point to a data element in a certain program stage newest event you have to use the first one. But if you are okay with using it from any stage, you can point it to the second. The TTP site is captured only in one stage. So it is okay to use any of these. So I will use newest event in the current program. If I use newest event in for a program stage. It will also ask the stage also then again you can use diagnosis and select the TB site or you can just use newest event from the current program and still you can choose this is site. In this use case you can use any of the two methods. So I'm going to save this so now disregard of the open event it will catch it will point to the data value of the TB disease site where it is captured lastly. So save this and then I'm going to create a program rule to show this value in my feedback widget. So my I'm going to create a new program rule. The program is TB treatment card. And I have to give a name for this so I will say. He be site in feedback, so I have to give a good description. So I'm not going to define any priorities so. Next, I have to enter my program rule expression. So here. I have to show the value of the TB site so I don't I expect to check anything in the program here. I just want to write that value in the widget. So only thing I can check here is whether there is a value in this TB site data element. So what I can do is I can check with the TB data the TB site has a value. I don't need to use any expressions. I don't need to use any logical operators. I just have to check whether it has a value. So for that, I can use this function has value and as the source field. I can put. TB disease newest. So not the current, but the nearest. Then I can define my action my action would be to show it in the this feedback widget. So I'm going to. Show this value of the TB site as a text. So if I click as displayed text. Then it will ask where to show it. I can put it in the program indicator widget. Or feedback widget program indicators we will do tomorrow. So feedback widget you already know where it is. So I want to display it there. I'm going to put it in the feedback widget. So next is what to show. So I can put a static text and also the variable text. So I have to put a variable text because I have to display the value in that variable. So to identify to give a label to that value, I can type a static text. So I will put TB disease. Right. As static text and then put the variable value as variable text. So if I put TB disease newest. Then it will show TB disease site as static text and the value from this variable as a text. I'm going to commit this now. I'm going to save. So I have created a program rule variable to capture to show the point to the value from the newest event. And to show it in the feedback widget. I'll clear my cache to be safe. And I'll go to like a capture TV program. We open one of these. So in this patient, the TB disease site is pulmonary and you can already see that in the TB disease site pulmonary is displayed in the feedback widget. So if I change it to extra pulmonary, you can see that in the feedback widget, the text has changed to extra pulmonary. And this one, I have used the newest event because I might be the data or the data entry person might be in the stage of continuation phase. So he or she might be entering data for this stage or this stage continuation phase two or even end of treatment. So this might be recording the treatment outcome, but still you have to show the TB disease site. So this value cannot be taken from the current stage which is open. It is available in a previous stage. So that's why we changed the source there we created a new variable there. So if you want to read more about the stages, the sources, you can go to the user guide. So here they give a good description about different source types for program rule variables, so which we already saw some in action. So you can recognize data element from the newest event for a program stage data element from the newest event in the current program so you can define a stage in the first one. So second one doesn't have a stage. So if you want to capture data from a specific stage only you can use the first one but you don't want to concern from which stage you can use the second one. And you can also read how these changes in event programs if you want, then the current event which we already did, then also you can use data element from a previous stage, previous event. So somebody getting asked this in as a question so you can get data, we can point to a data from a previous event also. So this is useful when you are checking for any progression from the previous value, so you can check whether the rate is increasing so you check the previous events value and you can create a program rule. So there is another thing called calculated value where you can assign a value to be used for other program rules I'm not going to complicate by explaining all the all these at the moment you can read. And if you have such requirement you can read it, then the tract entity attribute which we will see in a different example where you use the attributes not the data element as the source. So we can see that in our next example. So I hope this exercise for some of you might have been able to create it with me some will create it later so I hope it's clear. So let's move on to exercise five in the same program TV program. So this one is to calculate and assign the age of the patient from the date of birth. registration registration what you capture is I go to register what you capture is date of birth, and there is a field for age. So these are all attributes tract entity attributes. So when I when somebody puts the date of birth, the age should be automatically assigned. So that one we will see how to configure now. I'm going back to my maintenance app and then program. So first step would be to create the program rule variable. So this time, I have to point to a track entity attribute which is date of birth. The expression should point to my date of birth and then I should be able to calculate the age and assign it to age data element. So I'm going to create program rule variable. So they go into TV program. The treatment card. What do you say so I'll use the highest date of birth. So I'm pointing my variable to date of birth. So what is the source here the source is track entity attribute. Not a data element. So I'm going to point to track entity attribute and then select my track entity attribute which is date of birth. And I'm going to save it. Right. Then I'm going to create the program rule to assign age to the age element. So I'm going to create another program rule. So my program is TB treatment card and I have to give a name to this program rule. I will say TB patient age. Then I have to give a description. I will say assign age from date of birth. Next, I need to put an expression. So here again, I don't have anything to check. I don't need anything to be evaluated to be true to execute this action. I just need that attribute to have value. So what I'm going to do is like in similar previous occasion, I will check whether my data at entity attribute has a value. So I'm going to use this function has value and my source field. I have to replace with my variable. So I'm going to remove this and put my date of birth here. So this will check whether date of birth attribute has a value. Then I have to define my action. So my action would be to assign a value to the age track entity attribute. So I'm going to create a value to create an action. So on top it has this assign value action. Let's click on that. And then I have to define where to assign this. So I have to assign this to attract entity attribute which is displayed in the front registration page. So I have to assign it to age. I'm not going to assign to your data element, not to a program rule. Then I have to build the expression on what to assign. So I need to know how to calculate age from the date of birth. So I have the date of birth and I have to think of a function to get age in years to assign to that. So let's see what are the functions I have. So if you go through the function list, you have years between function. So years between function, you can define two dates and this will automatically calculate and out the number of years in between those two dates. So if I select that, then I have to define the two dates. So my two dates will be one is the pointer which we made, the attract entity. Sorry, the program rule variable, which we made called date of birth. So date of birth and second date will be I'm calculating the age up to today. So I can use this built in variable current date. Let's use this one. So I'm calculating years between the date of birth and the current date and assigning it to the age. Let's say I'll go through the program rule configuration again. Select the program, select, give a name and assign and give a description. Then the program rule expression. I'm checking whether the age of date of birth has a value and in the action I'm assigning value to age using this formula. Let's save it. Let's see whether the program rule which we made is working now. I cleared my cache. I'm going to track a capture. So I'll go to the TV program. Now if I start to register a patient I get the attributes which I need to record. Let's try putting a date of birth for this patient. And you can now see that age is automatically assigned to the activity activity. So my program rule is working fine and as I intended. So that is how you configure a program rule for attributes. So just referring back to the user guide. So if somebody is interested about this later about the operators, then about the functions, the list of functions which we used. We have used a few of these and some of the variables, the variables descriptions we have used. So you can go through the guide if you want a different rule to be created for your own instance. You can check whether you can use any of these functions, variables and operators mentioned in the guide. So one more exercise on the anti-natal clinic. So we will create the ANC program rule for gravity and parity which I showed earlier. So I'm going to do that in the demo instance. This is because there was some alterations done in the customized instance ANC program. So I had to use this demo version. So let's go to the antennas here. So for your exercise, you can use the customized instance where you created your ANC program. And please use your ANC program you created in the customized instance for this exercise too. So if I go to program, then program rule. So whether there are any antennas, we don't have the gravity program rule here. So if you can remember the program rule function, I wanted to hide parity if the gravity is one or blank. So when you're entering the gravity of a mother, if you enter two or above the parity, you should be able to capture parity. So I will start from the beginning. So I'm going to create a program rule first. So this program rule variable should point to gravity. So I'm going to create this now because it's not here. So my program is anti-natal care. I have to give a name, I'll give gravity and my source type. Now I can use data element in the current event. So because it's a skip logic program rule, when I select, when I enter the gravity, it should automatically show hide the parity data capturing element below that. So it's in the same event as where we record gravity. So it's in the current event. And then I have to select what data element it should point to, it should be to gravity. And I'm going to save it. So now I have my program rule variable created. Next, we are going to create the program rule. So my program rule is how you work in your head, whether you first check whether gravity is one or below that, one or blank. Then if it's one or blank, you hide parity. If it's more than one, you can, you have to show the field to enter parity. So I'm going to create program rule, the natal care name. Let's give a name for this. See, hide parity, description, hide parity. I gave a name, I gave a description and I need to create my program rule expression. So for this, I'm going to use the program rule variable, which I created for gravity. So you can define the program rule in any method. You can say gravity equals one or gravity equals blank. Or another way to say that is gravity equals or is equal or less than one. So there might be many different ways. So I will use the first method I mentioned. So I'm going to say gravity equals one. So here you don't need quotes because it's a number. But if it's a text, you have to put it within quotes. Then also I have to hide it if it's blank. Then equals. And within the quotes. So because it's a numerical, I think I can put zero. Let's say I put it in the other way, which would be better. Say gravity is less than or equal to one. So it's also the similar same thing. So if it's one or less than that, I have to hide my data entry field. So I'm going to define the action which is to hide parity. I'm going to hide field, which these things I think which we did earlier. Then the data element to hide disparity. And here we can define custom message or it will display the default message. And this time it will put a custom message is that too. So again, I'm going back to refresh. So until the program selected, I have given a name. I have given a description. Then I have given my expression as gravity less equal or less than one. If it's equal or less than one, I'm going to hide parity and also give a message. Save clear cache. Then I'll see whether the rule is working as I expected. Continental care. I can maybe register a new mother here. So I'm going to create a registration here. So I have the gravity. Let's put two. And when I put two, I can see the parity. Data element is coming up. Let's try one. It's going hidden. Let's try two again and put a parity one. So now I put gravity as two and parity as one. So that mother had two pregnancies with one birth after 24 weeks. But let's say I'm going to change it back to one. Now my message is coming parity blank as gravity is less than two. The message exactly as I defined. So my rule is working exactly as I wanted. So that's I think the end of third exercise. So we have created. We have done all the five exercises which we were expected. And also I'll just go back to the user manual to show you about the action. So also if somebody wants to read more on the actions. So this is documentation about the list of actions. Most of the things I think we covered, but you want to read further. There is a sign value, which we did display text, which we did. Then there's another thing or keep a value display errors around complete. Then hide field with it. So rather than hide field, I can hide sections so we can hide stages. You can make a field mandatory. Then show error with the show error show warnings. We did the warnings on complete. You can also send a message. You can schedule a message. Or you can hide specific options. So rather than hiding a data element, depending on a value of the previous data element, you can hide options. From an option set. So this is also very useful. So you might come across situations where this is needed. So you can group the options when you are creating options and you can use these groups also to hide or show. So this might come in handy when you're creating programs for your work. So that's, I think, all about what we intended to cover today. So I went slow. I don't know whether I might have felt slower for some people, but because it's a new concept and somebody some many people were not tried this before we had to go slow, but we actually finished on time.