 Let's hope not to forget it today. So let me share my screen. So we're starting today with one of the most complex, but one of the things that brings us a lot of support. So we hope that during this quick session, we managed to pass you the knowledge of what program rules are, or how to implement them in Android, and how you can find information in case you're having issues. And we'll have an exercise. So as you know, we are doing very short sessions. This is the way we decided to do these online academies. We gave 15 minutes, more or less, of theory session. And then we give you 15 more minutes for you to do an exercise. So basically, what we hope you manage at the end of the session is to understand what the program rules are, the main differences, and then submitting the exercise. Sorry, I'm putting the timer. So basically, what are the program rules? And here, I would like you to give you 30 seconds after this for you to think. These are real work samples. I would like to know what would you do? I will not let the mix open, because it might be a bit too many people talking. But I would like you to think, what would you do in the first case, and what would you do in the second case? Just quickly think for 10, 15 seconds. For the first case, I would charge my mobile. And the second case, I will stop my car. In case I see it's red. OK. So thank you very much. I don't know who's talking, because I cannot see the screen. Thank you for the, yeah. Basically, that's it. So for me, and this is the main thing, the key that we want to do is evaluation and action. So you were saying, I will take my phone wild, because you are seeing that the battery is running out. The phone is running out of battery. And on the second case, because we have a read some rules and saying, when we have a red in the traffic light, we need to stop. So we evaluate, and then we perform an action. So basically, this is the principle. I hope you can still see the screen properly. I'm resizing. Basically, this is the principle of the prior rules. We define prior rules to evaluate the current state of data and respond with a series of effects. So in the first example of the real world, we evaluate that we're running out of battery, and we perform an action. The same for the other one. We evaluate that the traffic light is red, and we stop. So this might sound a bit complex, but if we take it into real DHS2 words, we can evaluate based on the context or based on the input. And these things here that you can see are the boxes. But these two things are where we consider evaluation. So for example, you could say, in case the data has been entered on this specific date or on this or unit, I want to perform this action. Or in case the data element has this value, woman, pregnant, specific age, whatever, I perform this action. So that's it. It's as simple as that. Of course, it becomes much more complex, but basically it is this. This is a conceptual theme brought down to DHS2. If I can give you some real world samples of DHS2, so we forget now about the traffic light and about the battery, the phone running out of battery. So for example, I know in Uganda, they are using some different checks to evaluate the score of a specific health facility. So they calculate based on the input, and then they give you a score. Another thing, for example, we could have, if the user has selected sex as male sex, we can hide the pregnancy status. So it will help us on the data quality. It will help us on the input of the data encoder, because here she will say, male, then we can remove some other forms, parts of the form, to ease this. Or the last one, that is the one I will be using for the examples. If the patient has the hemoglobin really low, we have to show a warning to the nurse. So the nurse can perform actions. Yes, so you can, I think we gave you, or it's in the slides, but you could see the program rules in your program. So if you go to the programs that were assigned, and yesterday we showed you how to access, and you can use the admin account to log in the system and go through your program, you should see there's some program rules. So these program rules are the real program rules that have been encoded by the metadata packages at Oslo. And you could see that there are some rules that in terms of when the users enter some information, some program rules actions are up. So let's go back, now try to put back what I was playing before with the real world sample with the evaluation of context and the action. And we're gonna take this last program rule, that I was talking about. If the patient has hemoglobin real low, so warning to the nurse. So we can break program rules into different components. On one hand, we're gonna have the program rule variables that we will need and we will use to evaluate. Then we will compose an expression with them. And then we will perform the actions. So if we go to this sentence here, if the patient has the hemoglobin really low, so we can see that hemoglobin is our program rule variable, is the thing or is the data element, the data element value that we're gonna analyze and we're gonna create an expression. So if the patient has hemoglobin really low, it will be asked to be, it will be up to us to define what means real low, but we could say, for example, if the hemoglobin has been entering 76, I don't know if I'm saying something completely weird here because I don't know numbers in terms of hemoglobin, but we could say, okay, if it's under this, we consider real low. So we have taken the program rule variable, we have built our expression, and now we want to do something with it. What do we want to do? Here we could say, okay, I want to show a warning, I want to not let the user save the form, I want to make sure that the nurse knows what he or she's doing, so I'm gonna show the warning and before or afterwards, I'm gonna put another box that says, why did you save the inspiration if the hemoglobin or why did you not do this and she has to click yes or no, et cetera. So you can see three components, the rule variables, our expression, and the actions. I'd like to see your faces to see if you're understanding this or not. I think it's a complex topic, but I hope I managed to break it down in simple parts, but these are the references. In case you need to dig much more about this because we, I will not have the time to go through all the slides that I'm gonna be presenting now, I'm gonna go very quickly through them, just for you to have an idea of what's going on, but in case you want to understand more about Brown rules or you want to really, really know which Brown rules you can use on the one version, on the other version, what are the differences, how you can transform Brown rules that they are used in one place into the other one. Please refer to this documentation, you have the links here, you can download the slides from the learning platform and we can also maybe share them in Slack. So again, I will go very quickly and I will come back, but this set of slides that I'm marking as reference on the title are the ones that I'm putting here for you to have. It basically contains a very, very short summary of the proper documentation, but just for you, for example, to know that, yeah, so these are Brown revivals, how we can link our Brown revivals if we go here, we're talking about Brown revivals or EMO globin, we could take the EMO globin from our programming stage, we could take the EMO globin from the last event, we could take the EMO globin from our attribute, I don't think that should be an attribute, but for example, we could be talking about taking, if we have entered a sex, for example, I'm gonna go back to this one, if the user has selected sex mail, hide the pregnancy status, so sex is gonna be an attribute of the track identity, so we could create a rule. So basically, these are things that we can use for the Brown rule variables. I'm putting this mark here, I will not go through it, but just for you to know that there might be consequences in case you use the last event. How do you create Brown rules? So basically you can go here, there's something we're gonna ask you in the exercise, but if you navigate through this in your DHS2 server, you will be able to populate these fields with the Brown rule, the variable name, and put the source type, which is basically this. When you create a Brown rule, you will have to enter some details, so the rules are gonna have a name, you can specify the program, what you have to specify Brown, sorry, and you can specify a description in case you are managing the server with other people, or even for yourself, it's very good to fill the description with what the Brown rule is trying to achieve and hopefully it's gonna achieve. And the priority, I will explain very quickly that when you are doing Brown rules, you can specify the priority. And this means that you can say which Brown rule you want to be applied first. In case you define complex Brown rules or complex forms, maybe you will need some Brown rules to be evaluated before the other ones, because for whatever reason, we will not go into that. If you want, you could see, I think the ones that are in the system, they have priorities, if not, if you would go to the play servers, you will find that they are Brown rules with priorities. Here is the evaluation. So I'm going back to here, we were saying if the patient has hemoglobin really low, so this is our rule expression. I'm going back now to the very beginning, so evaluation action, if we go to the rule, if the traffic light is red, so this is what I'm putting here, the probable expression. So my condition, what I'm evaluating, so here is an example of the date of birth, if the user has entered properly the date, well, has entered date of birth, but here it would be if hemoglobin is less than 76, if traffic light is red, if phone battery lower than 3%, these are the variables that you can use, I will not go through them, you can find much more in the references, and there we go for the action. So here you can see that we have gone from the probability days, my expression, and now the action. I'm trying to go back from the real world example to here, so my action here was, as someone said very good, I checked my phone, I stopped. In my real DHS2 example, here I hide the pregnancy status, and the one we have been discussing is I show a warning to the nurse, and in this case, for example, we are assigning a specific year, so we are acting how many years have passed, since the date of birth and the current, basically it's giving me how many years this person has. In my real world example would be like this. So these are the available actions you have, a quick remark, because I'm not gonna go through them, but just for you to know that because of Android limitations, there are some that are not working, that are specifically this one, all the other ones will work, and this actually makes sense because we are working offline, or we don't have the capabilities to send or send a schedule messages. So in normal this grade, if you need more, please go to the references, and then one of the last slides, just for you to know that unfortunately, there are differences between how Android and web Chrome rules are evolved. Yeah, I kind of evaluated, and this is because the source code that both are using are a bit different. We hope that this is gonna be merged at one point, and you will not have to go through this head breaking experience, but it means that you can achieve to set a group of Chrome rules that will work in both environments, but can happen that what is working in one place does not work on the other one. We are sorry for this, it's gonna happen unfortunately, but I'm saying this here, so the recommendation is that you test very well in both Android and in web, because sometimes you might go live or production with your web version thinking it works, but then you will find you have issues with the Android. So what we're going is that you test very well in both environments to make sure that things are working as you expect. As a quick theme, for example, in web you could be adding Boolean, so you could be adding if the user has said yes to here and yes to here and yes to here, that's three points. For example, you are doing an evaluation. In Android it is not supported, and you have to go through a more different process. So you would have to say, if this person said yes, assign one to this program revival, yes to this one to this program revival, one to this program revival, and then add this program revivals. This is something that you could do and will work in web and will work in Android, but you have to go through the process of transforming your program rules from the web to Android. And here a quick chart, remind you what is supported and what is not supported. I know I went very fast. I hope at least I managed to reach you trying to understand the program rules, what are the differences between one thing or the other one, how to do this? And actually now the exercises is for you to create a program. So I'm gonna jump to my other set of slides and we will explain what do we expect from you from these exercises. Exercise, let's see if I can do this. So basically this exercise is something you need to submit. We want you to show that you know what program rules, how to create one, how you can experience them in Android. And it's an exercise you have to submit and we will use it for the final evaluation. Quick introduction. In your COVID-19 programs, in the phase one, so if you remember yesterday, we were talking about the program, there are different stages. One stage is called phase one clinical sinus symptoms. Yeah, sorry, there's a temperature data element there. And if the patient, the data encoder or the person who's taking and examinating the patient, Mark's fever, this temperature data element will be bought and for the data encoder to put and say, okay, I have measured, this person has fever. We know what fever is. We have to find that if humans have more and 70 degrees Celsius body temperature, we define this as fever and we can put this value. So you will see in your program, if you stop playing that when you put fever yes, this box comes and if you remove and you say if you were no, this box goes away. So this already one program rule, but the metadata packages have prepared for you for the COVID following the WHO guidelines. And what we're asking you is to improve the quality in the sense that, again, we check fever, yes, the temperature box comes out and we can put. But we can put any value there. We could put five degrees or we could put 300 degrees. So what we're asking you is to make a problem to increase or to improve the data quality of this. And what is the improvement that we're asking you is that, for example, if I mark fever, yes, and then I put a value lower than 37, there is a data discrepancy because fever cannot be a temperature measure under 30, at least in three months. So you could also put that it could be between this range, which could be maybe 37, 45, I think it's the maximum temperature maybe that can be measured in a human body if you have very big issues. So we want you to improve your program by creating a program rule that can apply this logic that I'm spending here. So when you access your program, if you go on the left, if you see on the left here, I'm taking the problem without that problem. And if you see fever, we have marked the option yes, and here we have enter number. And as you see, these are a state that should not be possible because I'm putting here at 35. And yes, fever and 35 is something that is not possible. However, this package, the COVID-19 case-based surveillance is not as fine or as strict as it should be, for example. So this state that is allowed. However, after making the exercise, as you can see here, I have created the program rule. I've put yes, I've put 36. So still I'm under 37 and I'm getting and receiving a message like this. This message is an error because it's in red. If it would be a warning, it will be in orange. And the fact that this is an error makes that Android will not let me save this stage. So we're asking you basically to build this. And here, we're gonna explain a bit how you should do it. Feel free to improve as much as you want. If you want to define that the temperature of the message, you can put something else. You can try here that instead of below 37, you cannot put something that is very big, et cetera. But the minimum thing we want you to do is to make sure that when the data encoder puts you a yes and the value is below 37, a message is displayed showing that this is an impossible state. So these are the steps that you need to do, which I will leave here, you can download, but basically you have to create the program variable for the temperature detail element because it's not created. Then you need to define the program rule details. You will define the formula and then the program rule actions, which is the message. Yes, for you to know that here, if you want, you could check the fever, but because there are already some program rules taking care of displaying this box when fever is marked as yes, you can opiate it. I will see, you will see here. So basically here I'm doing the exercise. I'm going to maintain as program variables available and creating the program variable. Here I'm doing the program rule with the program rule details. Then I go to the expression and then I go to the action and I'm putting this note. As you can see in my evaluation, I'm saying if fever yes and temperature is below 37, I'm gonna perform this action. However, you can try and try to remove fever, the evaluation of fever and you will see what happens. Or maybe try to define better logic, saying what I was saying, you're 30 between 37 and 45 or whatever you want. But without fever, it's also wanna work because there are other program rules that are hiding this. So you will see what happens. So again, this you can put it, you cannot put it. There are many ways of achieving what we're looking for here. As I said, this exercise is being evaluated. So what I need you to do is to submit one screenshot showing this. Here, this thing on the right. So you have to submit only one screenshot. We are not asking you to submit screenshots of how you have set the program rule on the data access server because if you manage to show this in your Android device, we understand that you have understood and code and managed to get the program rule after metadata synchronization. So basically that's it. We are giving you the next 10 minutes. For you to do the exercise, probably it's not gonna be enough. But again, feel free to use the breaks, feel free to use the Q&A sessions or if not an assignment for you to do as homework when you finish the attending academy. I'm gonna leave this because these are the steps and we will remain here in case you need four questions. If you have questions, feel free to open your mic. I cannot see you, but Marta or whoever is there as a facilitator will give you the four. We'll open the mic in case you need to ask for it. It is a question about submitting a high map. So maybe probably we should take five minutes at some point today to explain again because the question is, where do we need to submit this screenshot in Slack or it will be a task in academy platform. It is in the academy platform. All submissions are to be sent into the academy platform because they will come for your final grading. So I wonder if you can have some. I can quickly show here. So I'm gonna show it here. I think you can still see my screen. So if you, I'm gonna explain this now. I'll keep the recording. But if you have this kind of questions, you have problems with the learning platform, please don't hesitate to go to the Slack specific channel and ask for this. But basically when you access the learning platform here, if you go to the course, you will see that we have different, this is the description and down here we can see the different sessions. You can also, if you start a course or you resume the course in case you have already started it. Here on the left, you're gonna be seeing, make this video, the different days. So for example, yesterday, we talked about local metadata. Yesterday we had one assignment. Today there are three assignments because we're going through more sessions. So this is the first one I explain assignment rules, visual configurations and data entry that Marta will give in the next sessions. But I'm gonna go back to the one yesterday. And here I can see an assignment for day two. Okay, we'll look into that. Maybe it's because it has not been released yet. I think it should, but we'll take them. So going back here, if I go to assignment one here, I'm gonna see actually the instructions. So what I'm supposed to do, there's a description explaining how you can submit this. And then your response. So here is the actual assignment. Here, yesterday, for example, we asked you to submit three screenshots from the USM program. One is for this, one is for this, and one is for this. So basically I should go here. I'm sorry. This is it. So this, so I go here. I choose my file and I will submit my PDF or doc. I will upload the files and then I will submit. Please make sure you click this because as it explains here, you need to make sure you click this. Not by uploading the file, you still have not submitted this. Make sure you click on submit. If at one point you realize you have made a mistake and you have submitted the wrong document because it happens to us all, please go to learning platform, help, Slack channel and they will ask anyone they are pleased. I have made a mistake. My student ID is this and we will take it. I'm leaving this still for you, steps to follow. You don't hear me. Julian, yeah. But the rest here, right? I can hear you, yeah. I think we can hear you. So Julian, you probably have something not working in your audio. I can not hear you, he's not hearing this. So we have to type. They're saying I can't see any assignments so far. Did you explain that already? They are not open. They will open I think at 11 probably. No Jaime? Let me check because I... I think Simona said the time at 11. I don't know what time it was set. And I wonder, do you want to stop the recording? Yes, I'm gonna stop it. No, I'm gonna stop it. I was waiting till 40 because their question is ready to be... Ah, okay, okay. Then leave it here. Yes, so the assignments are not open yet. They will be open at 11. So as for 11, you should see the assignments. So don't worry. And if you feel, if you find that they're not being shown afterwards, please let us know. But in principle, in 20 minutes, you should be able to do this. Okay. You know, I don't know if I have finished that sentence. Sorry, I wasn't trying to itself. So if you cannot see the assignments after 11, please make sure you ask for help because in principle at 11, they should be open. I'm gonna stop the recording here. I think we have... Well, we're gonna have now 10 minutes break. So use the time for take a sip of water, coffee tea, whatever you need. Marta will continue with the next lecture.