QEWD-Courier / Ripple-Qewd

Node.js based middleware- for Ripple showcase stack
Apache License 2.0
15 stars 16 forks source link

CDRs problem in Events #47

Open ZuzooVn opened 7 years ago

ZuzooVn commented 7 years ago

Hi Ripple team,

I have 2 questions about CDRs.

1. Must we used both of Marand and EtherCIS?

I just want to use our EtherCIS server instead of Marand, thus I comment out marand code:

pasted image at 2017_07_05 05_04 pm

and I have this error. Please note that our EtherCIS server is still working like a champ with Marand. pasted image at 2017_07_05 03_31 pm

2. Must we save new appointment info into Marand?

I saw that you force use the marand for the destination.

pasted image at 2017_07_05 03_35 pm

Ripple will use this destination value instead of ethercis:

pasted image at 2017_07_05 03_48 pm

Thus, I remove the destination value inorder to use ethercis only, but I have this problem

pasted image at 2017_07_05 03_36 pm serviceTeam, dateOfAppointment, timeOfAppointmen are blank.

Could you please give me your opinion on my question?

Thanks and Best Regards,

Nam Vu from ThinkLabs-VN

ZuzooVn commented 7 years ago

@tony-shannon : Have a look, please :) Thanks

robtweed commented 7 years ago

Events have been recently updated (and are in the process of further updating). They will be replacing Appointments which currently must be set on Marand as that template isn't supported on Ethercis.

1) What version of qewd-ripple are you using (look for version in ~/qewd/node_modules/qewd-ripple/package.json) ?

2) In the browser's JavaScript console Network tab, what does the Events response that is returned to the browser look like when you just use your Ethercis system?

3) When you just use your Ethercis system, is the QEWD.js / qewd-ripple middle tier process log showing an error?

4) You may need to define/configure a new, updated Template on your Ethercis system - Ian McNicoll is the best person to advise on this issue.

tony-shannon commented 7 years ago

thanks @ZuzooVn You should be able to use etherCIS as the main CDR, though of our Marand is another option.

Please respond to @robtweed points Tony

ZuzooVn commented 7 years ago

@robtweed.

  1. What version of qewd-ripple are you using (look for version in ~/qewd/node_modules/qewd-ripple/package.json) ?

Version 2.28

  1. In the browser's JavaScript console Network tab, what does the Events response that is returned to the browser look like when you just use your Ethercis system?

Here's the returned response.

pasted image at 2017_07_11 10_42 am

  1. When you just use your Ethercis system, is the QEWD.js / qewd-ripple middle tier process log showing an error?

Everything is working like a champ.

  1. You may need to define/configure a new, updated Template on your Ethercis system - Ian McNicoll is the best person to advise on this issue.

@freshehr Could you please give me some advice here?

You should be able to use etherCIS as the main CDR, though of our Marand is another option.

@tony-shannon : Yes, we want to remove Marand CDR.

Thanks and Best Regards,

Nam Vu from ThinkLabs-VN

tony-shannon commented 7 years ago

thanks

Will await a response from @freshehr on what steps would be needed to do that. Most core headings should already be supported.

thanks T

tony-shannon commented 6 years ago

Reviewing and revising these issues;

re "@freshehr Could you please give me some advice here? You should be able to use etherCIS as the main CDR, though of our Marand is another option."

Can I ask you to give another view here @freshehr thanks

freshehr commented 6 years ago

Events handling has changed completely but should work on both Ethercis and Marand - I can't test right now as Ethercis is offline.

This is the internal doc (due to go up on github when I can draw breath!).

Heading

Events

Version:

1.0.0 1.0.1 added event Time to AQL and composition sample

05-Jun-2017

TemplateID:

IDCR - Service tracker.v0

Summary AQL /query:

To populate the list of items when the heading is selected.

select
    a/uid/value as uid,
    a/composer/name as author,
    a/context/start_time/value as date_created,
    b_a/description[at0001]/items[at0011]/value/value as eventName,
    b_a/description[at0001]/items[at0014]/value/value as eventType,
    b_a/description[at0001]/items[at0013]/value/value as eventDescription,
    b_a/time as eventTime
from EHR e
contains COMPOSITION a[openEHR-EHR-COMPOSITION.service_tracker.v0]
contains ACTION b_a[openEHR-EHR-ACTION.service.v0]
where a/name/value='Service tracker'

Detail AQL /query:

To populate the detailed view / edit when a single record within the heading is selected.

As above

Sample Composition(FLAT JSON) for POST/PUT /composition:

To create or update a composition for a single item via the /composition Ehrscape API call.

{
    "ctx/language": "en",
    "ctx/territory": "GB",
    "ctx/composer_name": "Dr Rory Best",
    "ctx/time": "2017-06-05T10:50:20.958Z",
    "ctx/id_namespace": "Ripple",
    "ctx/id_scheme": "Ripple",
    "ctx/health_care_facility|name": "Ripple General",
    "ctx/health_care_facility|id": "9091",
    "service_tracker/service:0/ism_transition/current_state|code": "526",
    "service_tracker/service:0/ism_transition/current_state|value": "planned",
    "service_tracker/service:0/service_name": "Event_name",
    "service_tracker/service:0/service_type": "Event_type",
    "service_tracker/service:0/description": "Notes",
    "service_tracker/service:0/time":"2017-06-05T10:50:20.958Z"
}

Notes:

{
    //Boilerplate
    "ctx/language": "en",
    //Boilerplate
    "ctx/territory": "GB",
    //author name
    "ctx/composer_name": "Dr Rory Best",
    //document commit time
    "ctx/time": "2017-06-05T10:50:20.958Z",
    //Boilerplate
    "ctx/id_namespace": "Ripple",
    //Boilerplate
    "ctx/id_scheme": "Ripple",
    //Boilerplate
    "ctx/health_care_facility|name": "Ripple General",
    //Boilerplate
    "ctx/health_care_facility|id": "9091",
    //Boilerplate
    "service_tracker/service:0/ism_transition/current_state|code": "526",
    //Boilerplate
    "service_tracker/service:0/ism_transition/current_state|value": "planned",
    //Event name
    "service_tracker/service:0/service_name": "Event_name",
    //Event type
    "service_tracker/service:0/service_type": "Event_type",
    //Notes
    "service_tracker/service:0/description": "Notes",
    //Event time
    "service_tracker/service:0/time":"2017-06-05T10:50:20.958Z"
}
tony-shannon commented 6 years ago

thanks Ian @freshehr can you let us know when this has been tested so Rob @robtweed can tackle any middleware revisions needed thanks Tony

freshehr commented 6 years ago

Working on both Ethercis and ThinkEHr now.

tony-shannon commented 6 years ago

thanks Ian @freshehr Should there be any changes needed by @robtweed in QEWD-Ripple?

3s-thangnn commented 6 years ago

Thus, I remove the destination value inorder to use ethercis only, but I have this problem

27861050-60be5dee-61a9-11e7-971f-738bfedb2d78

serviceTeam, dateOfAppointment, timeOfAppointmen are blank.

Could you please give me your opinion on my question?

Here's the returned response.

28053343-1a355f90-663a-11e7-9b9e-39040ac81788

Hi Ripple Team! I want to get many field "Event Type, Event Name and author" from Api /api/patients/{patientId}/appointments

Here's the returned response from Ethercis image

Thanks! Thang Nguyen from Thinklabs-VN

freshehr commented 6 years ago

Hi Nyugen,

The AQL for evenTime is incorrect (my bad!).

It should be

select
    a/uid/value as uid,
    a/composer/name as author,
    a/context/start_time/value as date_created,
    b_a/description[at0001]/items[at0011]/value/value as eventName,
    b_a/description[at0001]/items[at0014]/value/value as eventType,
    b_a/description[at0001]/items[at0013]/value/value as eventDescription,
    b_a/time/value as eventTime
from EHR e
contains COMPOSITION a[openEHR-EHR-COMPOSITION.service_tracker.v0]
contains ACTION b_a[openEHR-EHR-ACTION.service.v0]
where a/name/value='Service tracker'

The problem is that I was asking for the whole eventTime attribute, rather than the value of that element.

ThinkEhr seems to return the value correctly in these circumstances, whereas EtherCis is a bit more strictly correct.

I'm not sure if that resolves your problem?

Ian