Giter Site home page Giter Site logo

azure-samples / communication-services-contoso-med-app Goto Github PK

View Code? Open in Web Editor NEW
38.0 32.0 37.0 6.33 MB

Contoso Medical Application built using Azure Communication Services

License: MIT License

JavaScript 86.23% CSS 7.01% HTML 0.73% SCSS 5.96% EJS 0.07%

communication-services-contoso-med-app's Introduction

page_type languages products
sample
javascript
nodejs
azure
azure-communication-services

Azure Communication Services Demo with Contoso Med App

This is a sample application showing how quickly and easily it is to add the Azure Communication Services to a Telemedicine application using the Azure Communications Javascript SDK and some other Azure services on a react app Contoso Med App with a backend service ACS Node built using Node.js and Express.js that helps the client-side application connect to Azure.

Application Architecture

Application Architecture

Features

Azure Communication Service specific features

  • SMS service on appointment booking.
  • Chat service
    • Chat between Patient and QnA Bot.
    • Add doctor to the patient - bot conversation
    • Chat between Patient and Doctor.
  • Calling between Patient and Doctor.

General features

  • User authentication.
  • View doctors and book appointments.
  • Chat with QnA bot to book appointment or start a support consultation.

Critical sequences

Login

  Login Sequence  

Booking Appointment

  Booking Appointment Sequence  

Chatting and Calling via Azure Communication Service

  Chat and Call Sequence  

Set Up

Additional Reading

communication-services-contoso-med-app's People

Contributors

ddematheu avatar ddematheu2 avatar gc-codes avatar kushan-developer avatar manvirb4u avatar microsoft-github-operations[bot] avatar microsoftopensource avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

communication-services-contoso-med-app's Issues

Where do you get config.js values for web app front end?

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [ x] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Any log messages given by the failure

Expected/desired behavior

OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)
Windows 10

Versions

Mention any other details that might be useful

Where do you get the values for:

KEY_AUTH_TOKEN: "AUTH_KEY",
KEY_USER_TYPE: "USER_TYPE",
KEY_USER_NAME: "USER_NAME",
KEY_DISPLAY_NAME: "DISPLAY_NAME",
KEY_SPOOL_ID: "SPOOL_ID",
KEY_SPOOL_TOKEN: "SPOOL_TOKEN",

There is no where in the documentation that mentions these tokens and keys?


Thanks! We'll be in touch soon.

Issues with Med App side (Javascript / Node)

Please provide us with the following information:

This issue is for a: (mark with an x)

- [X ] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Set up projects to the point where everything is working, except for communication functions on the Web App.

  • Error when attempting to send text chat via footer
  • Error when initiating call from Doctors end to patient
  • (Other buttons do not work, for instance the call button on Patients side, when attempting to call doctor)

Any log messages given by the failure

TypeError: Cannot read property 'threadId' of undefined

Unhandled Rejection (TypeError): azure_communication_calling__WEBPACK_IMPORTED_MODULE_2_.Renderer is not a constructor

non-working buttons do not return error, simply nothing happens after click

Expected/desired behavior

Chat + Video to work

OS and Version?

Windows 10

Versions

Mention any other details that might be useful

One issue seems to be related to currentThreadInfo , as it is stating cannot read threadId of undefined. Thanks! (Line 32 of ChatArea.js)


Thanks! We'll be in touch soon.

Crash when calling

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

run application with parameters filled in and call other person

Any log messages given by the failure

Unhandled Rejection (TypeError): azure_communication_calling__WEBPACK_IMPORTED_MODULE_2_.Renderer is not a constructor
LocalVideoPreviewCard.componentDidMount
C:/Git Clones/communication-services-contoso-med-app/contoso-web-app/src/pages/chat/LocalVideoPreviewCard.js:21

Unhandled Rejection (CommunicationServicesError): Not able to subscribe to event callStateChanged, unknown event name

Unhandled Rejection (CommunicationServicesError): Not able to subscribe to event isRecordingActiveChanged, unknown event name

Expected/desired behavior

having a video call

OS and Version?

Windows 10

Versions

Mention any other details that might be useful


Thanks! We'll be in touch soon.

Error creating a new chat thread

This issue is for a: (mark with an x)

- [X] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

  1. Deploy all pre-requisites/components/solutions to Azure
    1. build version of the contoso-web-app
    2. full code of contso-node-api
  2. Login as Doctor and Patient on separate browsers to contoso-web-app
  3. Create a booking with a Doctor, and start Chat

Any log messages given by the failure

Following log messages are seen for the contoso-node-api solution:

creating new thread...
initializing chat client...
TypeError: CommunicationUserCredential is not a constructor
at Object.createThread (C:\home\site\wwwroot\services\chat.service.js:62:50)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async createThread (C:\home\site\wwwroot\controllers\chat.controller.js:8:20)
POST /chat/createThread 200 205.443 ms - -

Expected/desired behavior

A new chat thread should be created and message should be delivered to the other party.

OS and Version?

Windows 7, 8 or 10.

Versions

Mention any other details that might be useful


Thanks! We'll be in touch soon.

Configuration of API

What am I doing wrong, please?

This issue is for a: (mark with an x)

- [x ] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

I created a database in Cosmos DB emulator called ContosoMedApp.

I placed that database name in config.json:

"dbName": "ContosoMedApp",

I used the Mongo Connection String from Cosmos DB emulator in config.json:

"mongodbConnection": "mongodb://localhost:C2y6yDjf5%2FR%2Bob0N8A7Cgv30VRDJIWEHLM%2B4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw%2FJw%3D%3D@localhost:10255/admin?ssl=true",

I performed npm install and npm run start as per instructions.

Any log messages given by the failure

I receive the error:

connecting to cosmosdb...
C:\code\Azure Communication Sevices\Azure-Samples-communication-services-contoso-med-app-01April2021\contoso-node-api\controllers\user.controller.js:5
throw new Error("Update config.json with connection string");
^

Error: Update config.json with connection string
at Object. (C:\code\Azure Communication Sevices\Azure-Samples-communication-services-contoso-med-app-01April2021\contoso-node-api\controllers\user.controller.js:5:11)

Expected/desired behavior

I expected the API to run.

OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)

Windows 10

Versions

VS Code
Version: 1.55.0 (user setup)
Commit: c185983a683d14c396952dd432459097bc7f757f
Date: 2021-03-30T16:01:55.261Z
Electron: 11.3.0
Chrome: 87.0.4280.141
Node.js: 12.18.3
V8: 8.7.220.31-electron.0
OS: Windows_NT x64 10.0.19042

Mention any other details that might be useful


Thanks! We'll be in touch soon.

Fail to createChatThreadId

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [x ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Any log messages given by the failure

Expected/desired behavior

OS and Version?

Windows 10 20H2

Versions

Mention any other details that might be useful

  1. How to generate jwtPrivateKey in communication-services-contoso-med-app-main\contoso-node-api\config.json ?

    "mongodbConnection":"<COSMOS_DB_OR_MONGODB_CONNECTION_STRING>",
    "dbName": "<DATABASE_NAME>",
    "connectionString": "<AZURE_COMMUNICATION_SERVICES_CONNECTION_STRING>",
    "jwtPrivateKey": "<JWT_PRIVATE_KEY_FOR_AUTHENTICATION>",
    "endpoint": "<AZURE_COMMUNICATION_SERVICES_ENDPOINT>",
    "smsLogicAppEndpoint": "<AZURE_COMMUNICATION_SERVICES_SMS_LOGIC_APP_HTTP_TRIGGER_ENDPOINT>",
    "qnaMakerEndpoint": "<QNA_MAKER_ENDPOINT_URL>",
    "qnaMakerEndpointKey": "<QNA_MAKER_ENDPOINT_KEY>"

  2. Fail to createChatThreadId => token refresh of refresh args undefined

  3. Which @azure/communication SDK version are you using ?


Thanks! We'll be in touch soon.

Error: Cannot find module '@azure/communication-configuration'

Please provide us with the following information:

This issue is for a: (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request
- [x] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

npm install
npm run start

Any log messages given by the failure

hyounoo@Hyounwoos-MacBook-Pro contoso-node-api % npm run start

[email protected] start /Users/hyounoo/Github/communication-services-contoso-med-app/contoso-node-api
node ./bin/www

connecting to cosmosdb...
internal/modules/cjs/loader.js:834
throw err;
^

Error: Cannot find module '@azure/communication-configuration'
Require stack:

  • /Users/hyounoo/Github/communication-services-contoso-med-app/contoso-node-api/controllers/appointments.controller.js
  • /Users/hyounoo/Github/communication-services-contoso-med-app/contoso-node-api/routes/appointments.routes.js
  • /Users/hyounoo/Github/communication-services-contoso-med-app/contoso-node-api/app.js
  • /Users/hyounoo/Github/communication-services-contoso-med-app/contoso-node-api/bin/www
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:831:15)
    at Function.Module._load (internal/modules/cjs/loader.js:687:27)
    at Module.require (internal/modules/cjs/loader.js:903:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object. (/Users/hyounoo/Github/communication-services-contoso-med-app/contoso-node-api/controllers/appointments.controller.js:1:25)
    at Module._compile (internal/modules/cjs/loader.js:1015:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1035:10)
    at Module.load (internal/modules/cjs/loader.js:879:32)
    at Function.Module._load (internal/modules/cjs/loader.js:724:14)
    at Module.require (internal/modules/cjs/loader.js:903:19) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    '/Users/hyounoo/Github/communication-services-contoso-med-app/contoso-node-api/controllers/appointments.controller.js',
    '/Users/hyounoo/Github/communication-services-contoso-med-app/contoso-node-api/routes/appointments.routes.js',
    '/Users/hyounoo/Github/communication-services-contoso-med-app/contoso-node-api/app.js',
    '/Users/hyounoo/Github/communication-services-contoso-med-app/contoso-node-api/bin/www'
    ]
    }
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! [email protected] start: node ./bin/www
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the [email protected] start script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/hyounoo/.npm/_logs/2020-12-10T03_15_26_115Z-debug.log
hyounoo@Hyounwoos-MacBook-Pro contoso-node-api %

Expected/desired behavior

Expected to run the api server

OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)
macOS Catalina

Versions

10.15.7

Mention any other details that might be useful

Had some issue configuration config.json without detailed documentation.
I could create Azure CosmosDB with MongoDB Api option but the document didn't specified which to choose.

AlsoI couldn't fill the jwtPrivateKey as there is no explanation where to get this token key.

It would be better if the document describes how to deploy this to azure with step by step description(with some pictures :D).


Thanks! We'll be in touch soon.

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.