Skip to content
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

Open
Tracked by #81
tony-shannon opened this issue Aug 3, 2017 · 3 comments
Open
Tracked by #81

can't save Medication- issue traced to DateTime JSON #38

tony-shannon opened this issue Aug 3, 2017 · 3 comments
Labels

Comments

@tony-shannon
Copy link
Member

tony-shannon commented Aug 3, 2017

Unable to save new medication in dev or showcase environment

image

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

@dkryvosheya
Copy link
Collaborator

Patched; Blocked by QEWD issue - duplicated over within QEWD repo: QEWD-Courier/Ripple-Qewd#50

@dkryvosheya
Copy link
Collaborator

@tony-shannon @PhilBarrett this issue can be closed. have you had a time to check it out?

@PhilBarrett
Copy link
Member

No joy with this one, I see related issue with ripple-QEWD under investigation,so will leave this open for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants