-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
can't save Medication- issue traced to DateTime JSON #38
Labels
Projects
Comments
Patched; Blocked by QEWD issue - duplicated over within QEWD repo: QEWD-Courier/Ripple-Qewd#50 |
@tony-shannon @PhilBarrett this issue can be closed. have you had a time to check it out? |
No joy with this one, I see related issue with ripple-QEWD under investigation,so will leave this open for now. |
18 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: