PulseTile / PulseTile-AngularJS

Leading edge modular UI framework for healthcare. Based on AngularJS. See documentation at http://docs.pulsetile.com/ See plugins at https://github.com/PulseTile-Plugins ##
http://www.pulsetile.com
Apache License 2.0
20 stars 22 forks source link

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

Open tony-shannon opened 7 years ago

tony-shannon commented 7 years ago

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": "bob.smith@gmail.com", "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 commented 7 years ago

Patched; Blocked by QEWD issue - duplicated over within QEWD repo: https://github.com/RippleOSI/Ripple-Qewd/issues/50

dkryvosheya commented 7 years ago

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

PhilBarrett commented 7 years ago

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