CSV Upload: Validation of date concepts in form2 encounters

Tags: #<Tag:0x00007f23cdcd87f8> #<Tag:0x00007f23cdcd8730>

In Observation Forms, we have default setting of only allowing current and past dates for date concepts. For Observation forms we have date concepts like “Next Visit date” or “Estimated date of delivery” where future dates can be entered. On UI through config we are able to control the permission to allow future dates on any date control.

When we enter values for date concepts through migration templates then we it accepts future dates for all the date concepts which is risky.

If a future date is entered due to a human error for a date concept that ideally should not allow a future date then the data would be incorrect for the patient.

Approach :

  • Read date observation property (allowFutureDates) from form definition (.json)
  • validate observation value in CSV based on allowFutureDates property

++ @vmalini @pratibhasagar @rakeshtwhyd @angshuonline @gsluthra