Skip to content
This repository has been archived by the owner on Sep 11, 2019. It is now read-only.

Date time zone transformation problem #92

Open
poojaparasharam opened this issue Jul 2, 2018 · 0 comments
Open

Date time zone transformation problem #92

poojaparasharam opened this issue Jul 2, 2018 · 0 comments

Comments

@poojaparasharam
Copy link

Hi,

I'm committing opt with below code.

{
      "ctx/composer_name": "pooja"
      "ctx/id_scheme": "OrganizationId",
      "ctx/language": "en",
      "ctx/territory": "IN",
      "ctx/time": "2018-07-02T12:02:24+01:00",
      "encounter/context/start_time": "2018-07-02T11:02:24.203Z",
      "encounter/clinical_synopsis:0/notes": "clinical notes",
      "encounter/clinical_synopsis:0/language|code": "en",
      "encounter/clinical_synopsis:0/language|terminology": "ISO_639-1",
      "encounter/clinical_synopsis:0/encoding|code": "UTF-8",
      "encounter/clinical_synopsis:0/encoding|terminology": "IANA_character-sets"
    }

Sending current datetime 2018-07-02, 16:32 IST and in qewd level its converting to UTC format (see the line "encounter/context/start_time" ) and committing opt. When i retrieve committed opt the time zone remains in UTC format (response is below).
{
"composition": {
"/composer|name": "Pooja Parasharam khanapet",
"/content[openEHR-EHR-EVALUATION.clinical_synopsis.v1]/data[at0001]/items[at0002]|value": "clinical notes",
"/context/health_care_facility|identifier": "4f5d5c78-52d6-4013-96a8-97464d370bdb",
"/context/health_care_facility|name": "Shreyas",
"/context/setting": "openehr::238|other care|",
"/context/start_time": "2018-07-02T11:02:24.203Z",
"/language": "en",
"/territory": "IN"
}"
}
But when i try to retrieve committed details by aql query its giving correct committed time zone in UTC format(committed time and retrieved time is same but in UTC format). So after converting date_created to local datetime zone by using dateparser ( new Date() )in UI,its adding +5.30 to time.

The expected result is 2018-07-02 16:32 (IST) but im not getting correct UTC format. Please check below response.

select
a/uid/value as uid,
a/composer/name as author,
a/context/start_time/value as date_created,
b_a/data[at0001]/items[at0002]/value/value as notes
from EHR e [ehr_id/value='{{ehrId}}']
contains COMPOSITION a[openEHR-EHR-COMPOSITION.encounter.v1]
contains EVALUATION b_a[openEHR-EHR-EVALUATION.clinical_synopsis.v1] ORDER BY date_created DESCENDING

Response is :
"resultSet": [
{
"notes": "clinical notes",
"author": "Pooja",
"date_created": "2018-07-02T16:32:24Z"
}
]

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

No branches or pull requests

1 participant