Giter Club home page Giter Club logo

ballerina-integrator's Issues

Issues in Settle Payment payload - Healthcare Service

Description:
Settle Payment function has the following issues in healthcare-service.bal.

Issue 1 description

Payments can be settled for invalid appointment numbers, patient details, doctor category, doctor hospital.

Prerequisites

  1. Reserve an appointment as below.
    http://localhost:9090/clemency/categories/surgery/reserve
{  
	"patient":
	{  
        "name":"K Winslet",
        "dob":"1970-03-19",
        "ssn":"234-987-175",
        "address":"Canada",
        "phone":"32456789765",
        "email":"[email protected]"
    },
	"doctor":"anne clement",
	"hospital":"clemency medical center",
	"appointmentDate":"2020-01-22"
}

Steps to reproduce:

  1. Settle payment as below with an invalid appointment number.
{
                        "appointmentNumber":289,
                        "doctor":
                        {
                            "category": "surgery",
                            "name": "anne clement",
                            "hospital": "clemency medical center",
                            "availability": "10am - 6pm",
                            "fee": 10000.00
                        },
                        "patient":
                        {  
                            "name":"Kate Winslet",
                            "dob":"1970-03-19",
                            "ssn":"234-987-175",
                            "address":"Canada",
                            "phone":"32456789765",
                            "email":"[email protected]"
                        },
                        "fee":1800.0,
                        "confirmed":true,
                        "cardNumber":"3456812345"
                    }

Expected: There should be an error.
Actual: Successful response with a payment ID.

Settled payment successfully with payment ID: ebcc0452-65f1-4a79-a1e1-d4dfcc688544

  1. Retry the same scenario by providing invalid patient details, doctor category, doctor hospital.

Issue 2 description

Once the payment is settled and confirmed through the payload, the appointment does not get confirmed when it is retrieved through getAppointment.

{
                        "appointmentNumber":14,
                        "doctor":
                        {
                            "category": "surgery",
                            "name": "anne clement",
                            "hospital": "clemency medical center",
                            "availability": "10am - 6pm",
                            "fee": 10000.00
                        },
                        "patient":
                        {  
                            "name":"Kate Winslet",
                            "dob":"1970-03-19",
                            "ssn":"234-987-175",
                            "address":"Canada",
                            "phone":"32456789765",
                            "email":"[email protected]"
                        },
                        "fee":1800.0,
                        "confirmed":true,
                        "cardNumber":"3456812345"
                    }

Once it is retrieved though the getAppointment() the result is as below.
http://localhost:9090/clemency/categories/appointments/14

{
    "appointmentNumber": 14,
    "doctor": {
        "name": "anne clement",
        "hospital": "clemency medical center",
        "category": "surgery",
        "availability": "8.00 a.m - 10.00 a.m",
        "fee": 12000
    },
    "patient": {
        "name": "Kate Winslet",
        "dob": "1970-03-19",
        "ssn": "234-987-175",
        "address": "Canada",
        "phone": "32456789765",
        "email": "[email protected]"
    },
    "fee": 12000,
    "confirmed": false,
    "appointmentDate": "2020-01-22"
}

The confirmed field is still false in the response.

Issue 3 description

In appointment confirmation, fee cannot be less than doctor fee. But it allowed to make the payment settlement with a payload as below.

{
                        "appointmentNumber":14,
                        "doctor":
                        {
                            "category": "surgery",
                            "name": "anne clement",
                            "hospital": "clemency medical center",
                            "availability": "10am - 6pm",
                            "fee": 10000.00
                        },
                        "patient":
                        {  
                            "name":"Kate Winslet",
                            "dob":"1970-03-19",
                            "ssn":"234-987-175",
                            "address":"Canada",
                            "phone":"32456789765",
                            "email":"[email protected]"
                        },
                        "fee":180.0,
                        "confirmed":true,
                        "cardNumber":"3456812345"
                    }

Implement and Verify Enterprise Messaging Guides

Description:

This epic covers all the enterprise messaging related sub epics and issues. This effort should cover creating and verifying existing guides on enterprise messaging space.

Topics covered

  • Sending and receiving messages.
  • Guaranteed delivery
  • Store forward pattern
  • Transactions
  • Different protocols (JMS, AMQP, Kafka, NATS etc)

Implement ActiveMQ Connector examples

Description:

Need to verify use cases for connectivity with ActiveMQ broker and write examples as needed for the use cases.
This use cases will cover scenarios such as

  • Receiving messages from queue/topic
  • Sending messages to queue/topic
  • Shared subscription scenario
  • JMS based management operations such as creating temporary topics

VSCode based Ballerina Integrations plugin

Need to create a Ballerina integration specific VS Code plugin to provide assistance to an integration developer who is developing his integration use cases using Ballerina.

This includes functionality,

  • Creating integration projects using templates
  • Browsing connectors in Ballerina Central
  • Code snippets templates support.
  • Context sensitive integration use case specific intelli sense.

Improve Salesforce Connector

Description:

Need to verify current Salesforce connector and do necessary improvements. Find out relevant integration use cases and fix any feature gaps.

Issues in Appointment Reservation - Hospital Service

Description:
Following issues are found in hospital-service. (ClemencyHospitalService)

Issue 1

When it is added a different hospital(a hospital which doctor is not available) under doctor while appointment reservation, still the appointment is made. Once the appointment details are received through getAppointment, it displays the data of the doctor's original hospital. This is for the already defined doctors in clemency-hospital-service.bal.

Steps to reproduce

  1. Get doctors under category surgery for the already available doctors.
    http://localhost:9090/healthcare/surgery

Following payload is received.

 {
        "name": "anne clement",
        "hospital": "clemency medical center",
        "category": "surgery",
        "availability": "8.00 a.m - 10.00 a.m",
        "fee": 12000
    },
    {
        "name": "thomas collins",
        "hospital": "grand oak community hospital",
        "category": "surgery",
        "availability": "9.00 a.m - 11.00 a.m",
        "fee": 7000
    },
    {
        "name": "seth mears",
        "hospital": "pine valley community hospital",
        "category": "surgery",
        "availability": "3.00 p.m - 5.00 p.m",
        "fee": 8000
    }

2.Reserve the appointment as below. For the hospital provide any bogus value.

{  
	"patient":
	{  
        "name":"K Winslet",
        "dob":"1970-03-19",
        "ssn":"234-987-175",
        "address":"Canada",
        "phone":"32456789765",
        "email":"[email protected]"
    },
	"doctor":"anne clement",
	"hospital":"sdfgh",
	"appointmentDate":"2020-01-22"
}
  1. Check the response payload.
{
    "appointmentNumber": 18,
    "doctor": {
        "name": "anne clement",
        "hospital": "clemency medical center",
        "category": "surgery",
        "availability": "8.00 a.m - 10.00 a.m",
        "fee": 12000
    },
    "patient": {
        "name": "K Winslet",
        "dob": "1970-03-19",
        "ssn": "234-987-175",
        "address": "Canada",
        "phone": "32456789765",
        "email": "[email protected]"
    },
    "fee": 12000,
    "confirmed": false,
    "appointmentDate": "2020-01-22"
}

This issue occurs for the already available doctors only. Once we add a new doctor and retry the same steps following response is received.
'Doctor K Amugoda is not available in clemency medical center'. This should be the expected behavior for already available doctors.

Issue 2

Appointments can be reserved for a past date.

Issue 3

Following fields are not validated.
email address, phone, dob, date

Issue 4

Adding a new doctor is repeated in hospital service which is in healthcare service.

Add a sample for asynchronous service invocation

Description:

A sample for asynchronous service invocation using ActiveMQ broker in the middle.
This will cover

  1. listen for HTTP message (Json)
  2. Covert message to JMS and send to ActiveMQ queue
  3. Listen to queue and receive JMS messages
  4. convert back to Json and invoke the service.

There is no need to consider on delivery reliability on this implementation.

Implement Amazon SQS Connector

Description:

Implement Amazon SQS Ballerina connector using the REST API.

We might need to consider following when designing the API's

  • Handling requests for producing and receiving messages
  • Handling requests in batches.
  • Improving producer and consumer throughput using horizontal scaling

Verify NATS Connector

  • Verify NATS server and for EI use cases
  • NATS server use cases
  • NATS streaming use cases

Implement a guide for IBM MQ

Description:

A detailed guide of using IBM MQ as a brokering backend. This should cover details on

  • what are the configurations needs to be done
  • receiving and sending messages
  • transaction support. If it is same as JMS point to relevant doc
  • relevant connectors to be used.
  • data transformations if required.

Implement Connectors for well-known Integration Backends

Description:

Need to implement or verify existing connectors for well-known integration use cases with the following services

  • Salesforce Connector for SOAP and REST (Need to improve the existing connector)
  • SAP Connector ( Verify and improve the connector as needed)
  • Amazon S3 Connector
  • Amazon SQS Connector
  • File Connector ( Use built in Ballerina I/O. Verify and improve as needed)
  • Kafka Connector ( Verify and improve the connector as needed )

Implement File Connector Guide(s)

Description:

This guide(s) should cover the following use cases

  • Retrieving files from a location and doing some message mediation logic
  • Sending messages to a file location
  • Reading and writing from/to an FTP file source
  • Samba support
  • FTPS / SFTP support

Suggested Labels:

Suggested Assignees:

Affected Product Version:

OS, DB, other environment details and versions:

Steps to reproduce:

Related Issues:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.