You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the QEWD middle tier has always assumed that the UI will send 2 separate fields in a Medications POST - startDate and startTime
that's how it's always worked - just looking at the earlier handler for medication posts - just the same:
'current_medication_list/medication_and_medical_devices:0/current_medication:0/medication_statement:0/medication_item/course_details/start_datetime': {
default: function(data) {
var startDate = new Date(data.startDate).getTime();
var startTime = dateTime.msSinceMidnight(data.startTime);
var startDateTime = dateTime.format(new Date(startDate + startTime));
return startDateTime;
}
},
but all that's being sent now from the UI is startDate - all as one field:
"body": {
"sourceId": "",
"doseAmount": "500mg",
"doseDirections": "Breakfast, Lunch, Dinner",
"doseTiming": "tds",
"medicationCode": "123456789",
"name": "Metformin",
"route": "Po Per Oral",
"startDate": "2017-08-03T12:53:35.981Z",
"author": "[email protected]",
"isImport": false
},
So the middle tier is expecting the UI to send startDate and startTime as 2 separate fields
what the middle tier expects is startDate in JavaScript getTime() format - representing the date at midnight.....and startTime is the time in ms since midnight
Looks like someone's changed something in the UI codebase
Unable to save new medication in dev or showcase environment
issue traced by @robtweed as;
the QEWD middle tier has always assumed that the UI will send 2 separate fields in a Medications POST - startDate and startTime
that's how it's always worked - just looking at the earlier handler for medication posts - just the same:
'current_medication_list/medication_and_medical_devices:0/current_medication:0/medication_statement:0/medication_item/course_details/start_datetime': {
default: function(data) {
var startDate = new Date(data.startDate).getTime();
var startTime = dateTime.msSinceMidnight(data.startTime);
var startDateTime = dateTime.format(new Date(startDate + startTime));
return startDateTime;
}
},
but all that's being sent now from the UI is startDate - all as one field:
"body": {
"sourceId": "",
"doseAmount": "500mg",
"doseDirections": "Breakfast, Lunch, Dinner",
"doseTiming": "tds",
"medicationCode": "123456789",
"name": "Metformin",
"route": "Po Per Oral",
"startDate": "2017-08-03T12:53:35.981Z",
"author": "[email protected]",
"isImport": false
},
So the middle tier is expecting the UI to send startDate and startTime as 2 separate fields
what the middle tier expects is startDate in JavaScript getTime() format - representing the date at midnight.....and startTime is the time in ms since midnight
Looks like someone's changed something in the UI codebase
@dkryvosheya please take a look, thanks
The text was updated successfully, but these errors were encountered: