topcoderinc / va-pseudovet

pseudovet Project For VA
1 stars 1 forks source link

End data can be less data than the Start date #9

Closed sdgun closed 6 years ago

sdgun commented 6 years ago

Target URL

http://127.0.0.1:5000/configuration/create

Steps to Reproduce

  1. Open the URL http://127.0.0.1:5000/
  2. Click 'Create configuration' Tab
  3. Enter 'Start Date' as 28/2/1961
  4. Enter 'End Date' as 7/5/1960
  5. Fill all the other data
  6. Click NEXT

Actual Result(s)

Expected Result(s)

Frequency

Environment Details

Image(s)/Video(s)/Console Log/Crash Log

3

lfariapereira commented 6 years ago

Only "War Era" and "End Date" fields are editable. "Start Date" is not editable.

How should the app work on editing dates for this screen?

a) War Era is Editable. Start Date and End Date are not editable, and derived from War Era. b) War Era is Editable. Start Date is not editable, and End Date is editable. c) War Era is Editable. Start Date and End Date are editable fields as well.

talesforce commented 6 years ago

@sdgun can you please check and respond on this?

On Fri, Mar 16, 2018 at 7:55 PM, Luiz Fernando de Faria Pereira < notifications@github.com> wrote:

I'm trying to test this by hand, but I can't alter dates - I can only choose the War Era from the dropbox, and the dates are loaded with the era chosen.

Therefore, there is no user interaction for individual dates. Can you confirm this?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/topcoderinc/va-pseudovet/issues/9#issuecomment-373729279, or mute the thread https://github.com/notifications/unsubscribe-auth/AB7vcUwXGgLSHs8Avd90VjlDAFJmBHFdks5te8tdgaJpZM4Sk8q7 .

--

Regards,

Talesforce Co-pilot/ Reviewer/ Ex-Community Advisory Board talesforce@topcoder.com / admin@talesforce.com

www.topcoder.com http://topcoder.com/ / topcoder.com/blog / @Topcoder https://twitter.com/topcoder 760 Market Street, 11th Floor, San Francisco, CA 94102

lfariapereira commented 6 years ago

@talesforce @sdgun

In fact, 'End Date' is an editable field. Just updated my question in accordance!

sdgun commented 6 years ago

@lfariapereira "War Era is Editable. Start Date is not editable, and End Date is editable" but End Date > Start Date
@dustinWeaver Please confirm. cc @talesforce

lfariapereira commented 6 years ago

Thank you @sdgun . So, can we assume that desired behavior should be "War Era is Editable. Start Date is not editable, and End Date is editable"?

sdgun commented 6 years ago

Wait for the confirmation of @dustinWeaver

dustinWeaver commented 6 years ago

Let's go with option 3: Start date is not editable, end date is editable.

lijulat commented 6 years ago

@dustinWeaver The war era end date has no impact on the dataset generation according to the current randomizer/dataset generation code. Hence I don't find any use case for making this field editable.

Actually the Config screen is missing a Report End Year field which has an impact on the Dataset generation field.

Can we change the End date to a End Year field and map to the corresponding field on the config ?

cc: @talesforce

lijulat commented 6 years ago

@dustinWeaver @talesforce Can you confirm the above regarding endate ?

talesforce commented 6 years ago

I will have to defer this to Dustin

On Sat, 17 Mar 2018 at 8:46 PM, Liju notifications@github.com wrote:

@dustinWeaver https://github.com/dustinweaver @talesforce https://github.com/talesforce Can you confirm the above regarding endate ?

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/topcoderinc/va-pseudovet/issues/9#issuecomment-373927711, or mute the thread https://github.com/notifications/unsubscribe-auth/AB7vcUEV6cz_TI9DuJ2gZ2bRZwPu4mniks5tfSixgaJpZM4Sk8q7 .

-- Sent from Gmail Mobile

ShankarKamble commented 6 years ago

@talesforce @dustinWeaver , I have implemented validation as per suggestion means if start date is greater than end date then Next button will be disabled

lijulat commented 6 years ago

@dustinWeaver Please confirm, the war era start date and end date comes from the military era csv file. I feel this should not be allowed to be modified. We should add an additional report End year field(currently the dataset generator only accepts year)

CC: @talesforce

dustinWeaver commented 6 years ago

The start and dates do come from the war Era file, but the end date is just a reference. It will determine the last date of a generated patient's data. As such, we should allow the user to override it.

lijulat commented 6 years ago

@dustinWeaver It will determine the last date of a generated patient's data This is not determined by the war era end date . its actually determined by the year field in the config. The backend also doesnt support end date, it only supports end year for patient generation. I have currently mapped the end date field in the UI to the year field in the config so that actual patient generation is correct. But the downside is that since backend doesn't support day and month, I have hardcoded day as 31 and month as 12. Hope this is fine. Please let me know if any changes.

https://github.com/topcoderinc/va-pseudovet/blob/develop/pseudoVet-backend/readme.md

cc: @talesforce

dustinWeaver commented 6 years ago

Is the war Era end date the date that gets saved to the configuration?

lijulat commented 6 years ago

@dustinWeaver The config has two dates

"warEra": {
    "warEra": "World War II",
    "warEraCode": "world_war_ii",
    "warEraEndDate": "Tue, 31 Dec 1946 00:00:00 GMT",
    "warEraStartDate": "Sun, 07 Dec 1941 00:00:00 GMT"
  }

and

"year": 2018

The year is the one that is used as the end year to calculate the last date for patient generation. "warEraEndDate": "Tue, 31 Dec 1946 00:00:00 GMT", is not used in any patient generation.

lijulat commented 6 years ago

@dustinWeaver What I did is to map the UI End Date field to "year": in the config so that we can actually set the end date for the patient generation. But only Year is currently supported so I set the day as 31 and month 12 both non-editable . Only year as editable.

dustinWeaver commented 6 years ago

So what UI field drives the end date?

lijulat commented 6 years ago

@dustinWeaver Currently nothing it always sets to the current year.

As a fix I modified the UI End Date field to Map to the "year": instead of"warEraEndDate" in the config

dustinWeaver commented 6 years ago

Ok, then yeah. The end date in the UI should drive the last date for patient data.

ShankarKamble commented 6 years ago

I am confused , Please let us know , End date should be edible or not .

Also not understand End Date field to Map to the "year" instead of"warEraEndDate"