We are reporting a validation discrepancy identified in the "[POST] Create Medical Condition for Student" and "[PATCH] Update Medical Condition for Student" REST API endpoints. The current logic erroneously validates the dateReviewed
field against the current date instead of the dateEntered
field. This prevents the synchronization of historical medical records from our central database into iSAMS, as past dateReviewed
values are flagged as invalid.
Issue Details:
Endpoint: POST /medical/students/{schoolId}/conditions
Endpoint: PATCH /medical/students/{schoolId}/conditions{conditionid}
Documentation Reference: iSAMS Student Conditions API
Current Behavior: The API rejects dateReviewed
if it is not a future date relative to today’s date, returning the error: "Failed to create condition - Reviewed date must be in the future."
Expected Behavior: The dateReviewed
should validate against dateEntered
(i.e., dateReviewed
should be ≥ dateEntered
), allowing accurate historical data synchronization.
Example Scenario:
When submitting the following payload to reflect a past review date:
json:-
{
"dateEntered": "2024-03-13",
"dateReviewed": "2024-06-01",
...
}
The API incorrectly rejects the request, despite dateReviewed
(2024-06-01) being valid relative to dateEntered
(2024-03-13). Omitting dateReviewed
allows the record to be created without errors, but this bypasses critical data integrity requirements.
Impact:
This bug disrupts parity between our central medical database and iSAMS, as historical review dates cannot be accurately synced. For compliance and operational accuracy, it is essential that dateReviewed
aligns with the dateEntered
validation logic.
Request:
Please update the validation rule for dateReviewed
to reference dateEntered
instead of the current date. This adjustment will ensure seamless integration of historical and future records.
Kindly confirm the timeline for resolution or request additional details if needed. We appreciate your prompt attention to this matter.