Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: added TOC

Table of Contents


This type of Flex AppBlock allows the app user to set milestones based on a starting date or ending date.  Common use cases include:

  • Pregnancy
    • The app user can enter her due date (or date of last cycle), and each milestone gives information on a particular stage of pregnancy, e.g. "Week 18 - Baby is now moving around and you might be able to feel a kick or two!"
    • Click here to download a sample CSV for pregnancy.
    • For a detailed look at the pregnancy use case, check out this page.
  • Pre-op
    • The app user can enter the date/time of her surgery, and each milestone gives instructions on what to do at a certain time before the surgery, e.g. "9 hours before surgery - Nothing to drink after midnight! You may take all of your morning medications as usual with 4 oz. of water up to 3 hours before your procedure."
    • Click here to download a sample CSV for pre-op (colonoscopy).
  • Post-op
    • The app user can enter the date/time of her surgery, and each milestone gives instructions on what to do at a certain time after the surgery, e.g. "2 days after surgery - While a low grade fever is normal after the surgery, by day 2, it should be gone.  Call your doctor if there is a fever greater than 102."
    • Click here to download a sample CSV for post-op (tonsilectomy).


Required Setup

To use Milestones in this way, your Access Manager must be set to Registration, and you must have at least one date input field on the Registration Input View canvas.  The app user will set this date, which is what the AppBlock will use to calculate the dates for each milestone (each row in the CSV file = one milestone).  For a pregnancy AppBlock, this date field would be the app user's conception date or due date.  For a surgery AppBlock, this field would be the app user's surgery date-time.


Configuration

On the Configuration page for a List of Milestones, there are three tabs: Registration Fields, CSV Upload, and Content Publishing.

Registration Fields

On the Registration Fields tab, you can set your Primary Reference Field and, if necessary, your Secondary Reference Field.  You can also specify whether each reference field should be a Starting Milestone or and Ending Milestone.  The reference field will be filled in by the app user, and then used to calculate all the milestones.

Your choice will depend on your use case.  For a pre-op AppBlock, for example, you would want the app user to enter the date-time of the surgery - let's say you call this field "Surgery Start".  On the Registration Fields tab, you would set "Surgery Start" as the Primary Reference Field and mark it as an Ending Milestone (because the milestones come before the surgery, and the surgery marks the "end" of the milestones).  You can leave the Secondary Reference Field unselected.


In a pregnancy app, however, there are two dates that could be used - the expectant mother's due date or her date of conception (or date of last cycle).  The milestones can be calculated from either date, and you want to give the app user the option to use either one.  You would set one as the Primary Reference Field and the other as the Secondary Reference Field.  This way, if the user does not yet know her due date, she could enter the date of last cycle.  If the app user enters a date for both fields, the app will use the Primary Reference Field to calculate the milestones.  For due date, you would mark it as an Ending Milestone (because the milestones come before the due date, and the due date marks the "end" of the milestones).  For date of last cycle, you would mark it as a Starting Milestone (because the milestones come after the date of last cycle, and the date of last cycle marks the "start" of the milestones).

When selecting a reference field, you can only choose from date fields and date-time fields that have been placed on the Registration Input View canvas.


CSV Upload

On the CSV Upload tab, you can upload your CSV file, set the Final Milestone Duration, and set a Sample Reference Date.


Upload Your CSV File

The CSV must have a column labeled "IntervalFromFuture" and/or a column labeled "IntervalFromPast".  A reference field marked as a Starting Milestone uses the IntervalFromPast column to calculate the milestones.  A reference field marked as an Ending Milestone uses the IntervalFromFuture column to calculate the milestones.

Both columns should contain numbers - each number is the number of seconds away from the reference date (the one entered by the app user).  For example, in a child development AppBlock, you could have a milestone for each week.  For the first week, you would put "0" in the IntervalFromPast column.  For the second week, you would put "604800" because there are 604800 seconds in a week:

60 (seconds) X 60 (minutes) X 24 (hours) X 7 (days) = 604800

For the third week, you would put "1209600", etc.  You would get the app user to select the child's birthday on the Registration page.  When the app user does that, the app will calculate the dates of each milestone based on that selected date.  For example, if the selected birthday is April 1, 2016, the app would calculate that the first milestone starts at 0 seconds after April 1, 2016.  The second milestone would start 604800 seconds (1 week) after April 1, 2016.

In a pregnancy AppBlock, you could get the app user to enter the baby's due date on the Registration page.  You would set the due date field as an Ending Milestone, and the app will use the IntervalFromFuture column.  In your CSV, you would want to put "0" in this column for the last milestone (i.e. the last week of pregnancy), "604800" for the second-to-last week of pregnancy, "1209600" for the third-to-last, etc.  For example, if the app user selects December 31, 2016, the app would calculate that the last milestone starts at 0 seconds before December 31, 2016.  The second-to-last milestone would start 604800 seconds (1 week) before December 31, 2016.

Your CSV can have a column labeled "start_date" and a column labeled "end_date", but even if it doesn't the MobileSmith platform will add these two fields.  That way, you will be able to place these fields on the canvas when designing your pages.  The values in these columns are irrelevant in the CSV, because the app will calculate these values based on the date or date-time entered by the app user.  The start_date field will mark the beginning of each milestone, and the end_date will mark the end of each milestone.

Final Milestone Duration

As described above, the user-entered reference date is used to calculate the start_date of each milestone.  The end_date is actually not calculated, however, it just matches the start_date of the next milestone.  Because of this, there is no end_date for the final milestone.  To account for that, you can specify the Final Milestone Duration.  For the final milestone, the app will calculate the end_date by taking the final milestone's start_date and adding the Final Milestone Duration.

Sample Reference Date

Your app users will select a reference date the first time they launch the app, and that date will be used to calculate dates on certain pages.  When you are designing these pages, you probably want to be able to see dates like your end users will see.  The Sample Reference Date gives you that ability: once you've uploaded your CSV, select a date (or date-time) and the platform will use that to calculate your milestone dates.  These are shown in the "start_date" and "end_date" fields when you add them to a canvas.


Content Publishing

On the Content Publishing tab, you can specify whether or not List View and Carousel View (if applicable) use publishing.  Any view that is unchecked here will display all items in the list (all milestones).  A common use is to use publishing on the Carousel View, so that the Carousel (which is always on the Home page) only displays the current milestone, while not using publishing on the List View, so that the List page displays each milestone.


Data Mapping

In Data Mapping, you will not see the IntervalFromPast or IntervalFromFuture fields.  Otherwise, it is the same as Data Mapping for any other AppBlock.


Canvases

A List of Milestones AppBlock will always have these 3 canvases: List View, Detail View, and Empty List View.

You can also set a List of Milestones AppBlock as the target of a Carousel, in which case the AppBlock will have two additional canvases: Carousel View and Empty Carousel View.


Date range restrictions

For any date field on an Input canvas, you can set the range of allowable dates.  You can set both the future and the past range, which are both "Unlimited" by default.  Thus, if you do not modify the default range settings, the app user will be able to select any date.


Filter by label (Content by label)
showLabelsfalse
max5
spacesMOSTKB
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel in ("pregnancy","list_of_milestones","flex","milestones") and type = "page" and space = "MOSTKB"
labelsflex milestones pregnancy list_of_milestones

Page Properties
hiddentrue


Related issues