Use of Sketchware calendar component to get Rabies Vaccine Schedule

Anti Rabies Vaccine is administered intramuscularly in a dosing schedule of days 0, 3, 7, 14, and 28.

Now I will describe how to create Sketchware App to get rest of the dates when day 0 is provided.

First set the view of the App. It must contain three Edittext layouts to enter date of 0 dose, one Button to get output, and four Textview fields to display the output of four remaining dates (i.e. dose 3, 7, 14, and 28).

In Logic area add a new Calendar component.

After that, in the on button click function, set the Day_of_month, month, and year of Calendar component to the date entered in Edittext fields.
Note that the Calendar month is set to a value 01 less than the value in text field. This is because month in java is from 0-11.

Now the date of our calendar is set to the date we enter in Edittext fields (The 0 dose of vaccine).

Next add hours equaling desired number of days to the Calendar, serially, in a way that after every addition the next date is printed by setting text of textviews.

Here I have added 72h (+3 days) for day 3, then 96h (+4days) for day 7, then 168h (+7 days) for day 14, and 336h (+14 days) for day 28.

Save and run the app to use it. The picture below shows the results.

Note that if you are creating a similar app, you have to use several if else blocks in order to prevent entry of wrong dates in Edittext fields.

The video below shows how I created it:


Post a Comment

Popular posts from this blog

A Flash Light App in Sketchware

Firebase auth in Sketchware for Login Activity

Simple car racing android game in Sketchware

Create a PDF reader android App in Sketchware

Easiest way to create an App for your website