# How To Make A Patient-Doctor Chat App

**URL:** <https://community.thunkable.com/t/how-to-make-a-patient-doctor-chat-app/1305212>\
**Category:** Questions about Thunkable X\
**Created:** [May 25, 2021, 3:19am UTC](https://community.thunkable.com/t/how-to-make-a-patient-doctor-chat-app/1305212 "2021-05-25T03:19:01Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![overturner](https://avatars.discourse-cdn.com/v4/letter/o/53a042/32.png) [@overturner](https://community.thunkable.com/u/overturner)\
**Post date:** [May 25, 2021, 3:19am UTC](https://community.thunkable.com/t/how-to-make-a-patient-doctor-chat-app/1305212/1 "2021-05-25T03:19:02Z")

</div>

Hi , This is my first post , so how can I make a chat app  
between doctor and patient , ❓ like how to automatically pair a doctor and patient when a patient clicks on a button

I’d appreciate any ideas or suggestion for how I could handle this, thanks.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [May 25, 2021, 3:38am UTC](https://community.thunkable.com/t/how-to-make-a-patient-doctor-chat-app/1305212/2 "2021-05-25T03:38:10Z")

</div>

What have you searched for? There are lots of examples of chat apps and ways to sign in to Thunkable.

---

<div class="post-metadata">

**Author:** ![overturner](https://avatars.discourse-cdn.com/v4/letter/o/53a042/32.png) [@overturner](https://community.thunkable.com/u/overturner)\
**Post date:** [May 25, 2021, 4:06am UTC](https://community.thunkable.com/t/how-to-make-a-patient-doctor-chat-app/1305212/3 "2021-05-25T04:06:00Z")

</div>

> [@tatiang](#):
>
> What have you searched for?

I searched and understood how to make chat app  
but how to pair 2 people automatically  
instead of them entering room name  
specifically doctor and patient

---

<div class="post-metadata">

**Author:** ![codeswept](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/codeswept/32/87755_2.png) [@codeswept](https://community.thunkable.com/u/codeswept)\
**Post date:** [May 25, 2021, 4:28am UTC](https://community.thunkable.com/t/how-to-make-a-patient-doctor-chat-app/1305212/4 "2021-05-25T04:28:34Z")

</div>

This sounds like a WhitehatJr homework assignment. Please don’t ask us to do your homework for you.

---

<div class="post-metadata">

**Author:** ![overturner](https://avatars.discourse-cdn.com/v4/letter/o/53a042/32.png) [@overturner](https://community.thunkable.com/u/overturner)\
**Post date:** [May 25, 2021, 4:37am UTC](https://community.thunkable.com/t/how-to-make-a-patient-doctor-chat-app/1305212/5 "2021-05-25T04:37:16Z")

</div>

No this is not a whitehat assignment  
i want to do it on my own. though i tried to search for it , everywhere it said that the doctor would have to join the same room name as the patient , thats why i posted here.  
Not WHJR Assignment

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [May 25, 2021, 4:51am UTC](https://community.thunkable.com/t/how-to-make-a-patient-doctor-chat-app/1305212/6 "2021-05-25T04:51:11Z")

</div>

There has to be some way to uniquely identify a connection between the doctor and patient. To me, it makes sense to use a room ID. If that’s not what you want to do, maybe you can come up with a different idea.

The room ID is the same idea as something like Team Viewer or Zoom. They each have unique meeting IDs that participants have to know.

---

<div class="post-metadata">

**Author:** ![overturner](https://avatars.discourse-cdn.com/v4/letter/o/53a042/32.png) [@overturner](https://community.thunkable.com/u/overturner)\
**Post date:** [May 25, 2021, 5:08am UTC](https://community.thunkable.com/t/how-to-make-a-patient-doctor-chat-app/1305212/7 "2021-05-25T05:08:20Z")

</div>

@tatiang  
Yes that is exactly what i want to do and am able to do but essentially i want the doctor to see all the started chats. That is my main idea.  
because from my side patient is able to join chat but every time i cant send a message to the doctor saying that there is a chat started.  
this is how i want it to look from the doctors side

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/1/011bb1aed97bfdfa8bc79b9f82883d746a9aadd1.png)  
and when the doc clicks on the arrows it should take him to the chat

---

<div class="post-metadata">

**Author:** ![overturner](https://avatars.discourse-cdn.com/v4/letter/o/53a042/32.png) [@overturner](https://community.thunkable.com/u/overturner)\
**Post date:** [May 25, 2021, 11:26am UTC](https://community.thunkable.com/t/how-to-make-a-patient-doctor-chat-app/1305212/8 "2021-05-25T11:26:56Z")

</div>

@tatiang  
hope you understood

---

<div class="post-metadata">

**Author:** ![catsarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/catsarisky/32/100661_2.png) [@catsarisky](https://community.thunkable.com/u/catsarisky)\
**Post date:** [May 25, 2021, 11:43am UTC](https://community.thunkable.com/t/how-to-make-a-patient-doctor-chat-app/1305212/9 "2021-05-25T11:43:40Z")

</div>

That sounds doable. So you just need to show your doctor a list of (active?) rooms. What have you tried? Where are you stuck?

---

<div class="post-metadata">

**Author:** ![overturner](https://avatars.discourse-cdn.com/v4/letter/o/53a042/32.png) [@overturner](https://community.thunkable.com/u/overturner)\
**Post date:** [May 25, 2021, 11:53am UTC](https://community.thunkable.com/t/how-to-make-a-patient-doctor-chat-app/1305212/10 "2021-05-25T11:53:56Z")

</div>

@catsarisky  
yes , that is exactly what i want to do. Actually i had an idea to add list but couldn’t understand how to start

---

<div class="post-metadata">

**Author:** ![catsarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/catsarisky/32/100661_2.png) [@catsarisky](https://community.thunkable.com/u/catsarisky)\
**Post date:** [May 25, 2021, 12:07pm UTC](https://community.thunkable.com/t/how-to-make-a-patient-doctor-chat-app/1305212/11 "2021-05-25T12:07:02Z")

</div>

Have you worked through one of the existing chat tutorials? Which one?

---

<div class="post-metadata">

**Author:** ![overturner](https://avatars.discourse-cdn.com/v4/letter/o/53a042/32.png) [@overturner](https://community.thunkable.com/u/overturner)\
**Post date:** [May 25, 2021, 12:20pm UTC](https://community.thunkable.com/t/how-to-make-a-patient-doctor-chat-app/1305212/12 "2021-05-25T12:20:24Z")

</div>

yes i have worked through many and i can make a chat app but problem is to show the list can you help?

---

<div class="post-metadata">

**Author:** ![catsarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/catsarisky/32/100661_2.png) [@catsarisky](https://community.thunkable.com/u/catsarisky)\
**Post date:** [May 25, 2021, 12:33pm UTC](https://community.thunkable.com/t/how-to-make-a-patient-doctor-chat-app/1305212/13 "2021-05-25T12:33:13Z")

</div>

Not without knowing more specifics. Are you using firebase? What’s the structure of the data? Do you already have a room ID in your data, or will you use the patient ID as the room ID? Do you need help getting the list of rooms out of firebase, or something else?

---

<div class="post-metadata">

**Author:** ![overturner](https://avatars.discourse-cdn.com/v4/letter/o/53a042/32.png) [@overturner](https://community.thunkable.com/u/overturner)\
**Post date:** [May 25, 2021, 2:40pm UTC](https://community.thunkable.com/t/how-to-make-a-patient-doctor-chat-app/1305212/14 "2021-05-25T14:40:47Z")

</div>

@catsarisky yes , i am using firebase and i am using patient id as room id i . And yes , i wanted to know how to get the list of rooms out of firebase  
thanks in advance

---

<div class="post-metadata">

**Author:** ![catsarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/catsarisky/32/100661_2.png) [@catsarisky](https://community.thunkable.com/u/catsarisky)\
**Post date:** [May 25, 2021, 2:56pm UTC](https://community.thunkable.com/t/how-to-make-a-patient-doctor-chat-app/1305212/15 "2021-05-25T14:56:32Z")

</div>

Can you show a screenshot with the structure of the data?

---

<div class="post-metadata">

**Author:** ![overturner](https://avatars.discourse-cdn.com/v4/letter/o/53a042/32.png) [@overturner](https://community.thunkable.com/u/overturner)\
**Post date:** [May 25, 2021, 3:07pm UTC](https://community.thunkable.com/t/how-to-make-a-patient-doctor-chat-app/1305212/16 "2021-05-25T15:07:57Z")

</div>

@catsarisky

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/4/e48a285b2111d92d8a430de16ec6d2903124b368.png)  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/f/8f759730989e955fbef6bc521906b668986a95fd.png)

---

<div class="post-metadata">

**Author:** ![catsarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/catsarisky/32/100661_2.png) [@catsarisky](https://community.thunkable.com/u/catsarisky)\
**Post date:** [May 25, 2021, 3:17pm UTC](https://community.thunkable.com/t/how-to-make-a-patient-doctor-chat-app/1305212/17 "2021-05-25T15:17:50Z")

</div>

I need to see the data structure, not the blocks. Take a screenshot of what you see in your firebase console? (Cover up any confidential info, of course!)

---

<div class="post-metadata">

**Author:** ![overturner](https://avatars.discourse-cdn.com/v4/letter/o/53a042/32.png) [@overturner](https://community.thunkable.com/u/overturner)\
**Post date:** [May 25, 2021, 4:18pm UTC](https://community.thunkable.com/t/how-to-make-a-patient-doctor-chat-app/1305212/18 "2021-05-25T16:18:40Z")

</div>

oh ok @catsarisky  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/5/e5853e2aee3252edd0a38ed6655c4d536a45b403.png)  
i will change room id to patient id later but for now this is how it is stored

---

<div class="post-metadata">

**Author:** ![overturner](https://avatars.discourse-cdn.com/v4/letter/o/53a042/32.png) [@overturner](https://community.thunkable.com/u/overturner)\
**Post date:** [May 25, 2021, 4:26pm UTC](https://community.thunkable.com/t/how-to-make-a-patient-doctor-chat-app/1305212/19 "2021-05-25T16:26:08Z")

</div>

> [@catsarisky](#):
>
> I need to see the data structure, not the blocks

Well , now you have both

---

<div class="post-metadata">

**Author:** ![catsarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/catsarisky/32/100661_2.png) [@catsarisky](https://community.thunkable.com/u/catsarisky)\
**Post date:** [May 25, 2021, 5:04pm UTC](https://community.thunkable.com/t/how-to-make-a-patient-doctor-chat-app/1305212/20 "2021-05-25T17:04:59Z")

</div>

So looking at the bit of the structure you pasted, at Holley and Hospital and ICU the names of the rooms? How do you handle multiple messages in a room? What structure is above this branch?

If those are the room names, and “rooms” is the top bucket, then something like this would populate your listviewer with the names of the rooms:

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/4/24b12a9a11004809439aa9d0bf9fcd801e42d236.png)  
(you can ignore the timer block - leftovers from speed testing something else!)

That’s a basic example - you’ll want to do error checking and verify that value is not null before going on to set listviewer.

[Next page](https://community.thunkable.com/t/how-to-make-a-patient-doctor-chat-app/1305212.md?page=2)
