Implementation of Telegram Chatbot as Information Service of Madani Hospital Pekanbaru
on
JURNAL ILMIAH MERPATI VOL. 11, NO. 3 DECEMBER 2023
p-ISSN: 2252-3006
e-ISSN: 2685-2411
Implementation of Telegram Chatbot as Information Service of Madani Hospital Pekanbaru
Aldi Hariansyaha1, Elin Haerania2, Novriyantoa3, Muhammad Affandesa4 aUniversitas Islam Negeri Sultan Syarif Kasim, Riau, Indonesia e-mail: 1[email protected], 2[email protected], 3[email protected], 4 [email protected]
Abstrak
Organisasi berusaha membangun citra positif melalui layanan informasi namun, Rumah Sakit Madani di Pekanbaru membutuhkan perbaikan. Penelitian ini merancang chatbot pendaftaran di Telegram untuk meningkatkan akses informasi pasien. Telegram dipilih karena kecepatan dan popularitasnya. Penelitian melibatkan survei literatur, identifikasi masalah, dan pengumpulan data, membentuk dasar untuk merancang alur chatbot. Metode pengembangan menggunakan Sommerville's Waterfall, mencakup tahap pendefinisian kebutuhan, desain, implementasi, uji coba, integrasi, operasi, dan perbaikan. Tahap penting adalah User Acceptability Testing, di mana 20 calon pasien diuji dengan kuesioner beragam. Implementasi chatbot melibatkan Python API Telegram dan database MySQL, dengan pengujian Black Box untuk aspek akses pasien, pendaftaran, fungsi, autentikasi admin, create update read delete admin, dan penanganan kesalahan. Hasil User Acceptability Testing menunjukkan akurasi 77,8%, mencerminkan kinerja sangat baik dalam memenuhi kebutuhan pasien, menunjukkan efektivitas dan penerimaan positif terhadap chatbot ini.
Kata kunci: chatbot, bot telegram, layanan informasi
Abstract
The organization seeks to build a positive image through information services, but madani hospitals in new pekanneed repair. The study designed a chatbot sign-up in telegram to increase access to patients' information. Telegram is chosen for its speed and popularity. Research involves literature surveys, problem identification, and data collection, forming the basis for designing the chatbot furs. Development methods using sommerville's waterfall include the defining needs, designs, implementation, trials, integration, operation, and improvement stages. The important stage is the user test-testing, where 20 patients are tested by various questionnaires. The chatbot implementation involves python fire telegram and mysql databases, with black box testing for subjects of patient access, registration, funcacy, admin authenticity, create update read delete admin, and error management. The results of the user test-testing show an accuracy of 77.8%, reflecting very good performance in meeting the patient's needs, showing positive effectiveness and acceptance of the chatbot.
Keywords : chatbot, telegram bot, information services
Every institution or organization undoubtedly has high expectations of being able to present a positive image to its clients. Building a positive image for an institution involves creating Public Relations, and one of the key components is providing informational services[1]. The service of information is the activity of providing understanding to individuals with interests in various aspects necessary for carrying out a task or activity, or for determining the direction of a desired goal or plan[2].
Many institutions in Indonesia are found to provide information services to their clients through telephone or official websites[3]. One example is hospitals, where patients, especially those who have never been to a hospital before, may encounter difficulties in finding the necessary information[4]. This occurs at Madani Hospital in the city of Pekanbaru, where the website only provides the names of practicing doctors. To schedule an appointment or register with a doctor, one must physically visit the hospital, leading to potential time wastage due to prolonged waiting periods.
In Mayor Regulation of Pekanbaru Number 26 of 2018, improving hospital services to be more accessible to the community is deemed necessary. This includes scheduling appointments with doctors at the hospital. Therefore,Madani Hospital requires an information service to assist in providing online services. This way, patients can schedule appointments with doctors, view doctors' schedules, obtain emergency room information, and access the hospital's location. This research involves the implementation of a hospital registration chatbot based on the Telegram platform.
The Telegram application is quite popular across various demographics due to its prominent features. Telegram's main advantages include being lightweight, free, and having a very small size, making it accessible on various devices with low specifications[5]. And it claims speed and security features[6]. The Telegram application has been downloaded over 1 billion times since its inception, solidifying its position as one of the most sought-after messaging applications[7]. Telegram has become one of the primary choices for efficient and secure communication for many people. One of its features is the Telegram Bot, which can assist in streamlining information services, thereby optimizing time for various tasks[8].
The Telegram Bot is an innovative tool that is increasingly utilized across various sectors, including the healthcare industry. Its ability to provide fast, accurate, and interactive information services makes it a highly relevant solution in the context of hospitals[9]. With the potential to provide information about doctor schedules, registration procedures, emergency room information, or even offer health-related insights to patients, the Telegram bot represents a significant development in efforts to enhance healthcare services. We will delve deeper into how Telegram bots can help build stronger relationships between hospitals and patients, contributing to improved quality of care.
The implementation of registration chatbot in the chatbot application also reflects Madani Hospital commitment to facing the digital transformation era. By introducing innovative and easily accessible information services through the Telegram chatbot[8]. Capable of fostering a closer relationship between the community and Madani Hospital, this research is expected to provide a profound insight into the potential and challenges of implementing chatbot technology in the healthcare sector. It aims to inspire other hospitals to adopt similar solutions to enhance service quality and create an even better patient experience.
This research was conducted at Madani Hospital in Pekanbaru. The data collection process involved the author providing information using a descriptive or survey method. The author gathered data from several employees and the IT head of Pekanbaru Madani Hospital, which served as a reference for determining the workflow of hospital services.
The research stages of implementing a chatbot as an information service at Madani
Hospital Pekanbaru are as described in Figure 1:
Figure 1. Research Methods
The following is an explanation flowchart outlining the stages of the research:
-
a. Literature Survey
In this stage, the author will gather references from several previous studies and relevant information on the chosen topic.
-
b. Problem Identification
Identify the issues that will be discussed later, particularly related to the implementation of a Hospital Chatbot using the Waterfall Method based on previous research and obtained information.
-
c. Literature Review
Read and analyze previous research in the form of books or research journals related to Telegram Bot and the Waterfall Method. This information will be used as theoretical foundations in the study.
-
d. Determining Data Sources
In this research, the author will identify various data sources, including primary and secondary data. Primary data, obtained directly from research subjects, will be collected through interviews with the IT head and employees of Pekanbaru Madani Hospital. Secondary data, obtained indirectly, includes processed or quoted information from sources such as the internet, magazines, articles, books, and various previous studies related to the research.
-
e. Field Observation
To conduct field observations, the researcher will directly visit the hospital and seek permission from the authorized parties to conduct the research.
-
f. Data Collection
In this stage, the author consolidates data and interviews relevant parties to obtain interconnected information for this research. This includes data for hospital registration used to schedule appointments with doctors.
-
g. Data Analysis
During this stage, the author analyzes and processes the gathered data to determine the design flow of the chatbot.
-
h. Interesting Conclusions
At this stage, the author draws conclusions based on the analyzed data from the previous sections, examining whether the conclusions align with the intent and purpose of the research. Additionally, the author provides recommendations for improvements and developments for the company to enhance its performance in the future.
The system development stage utilizes Sommerville’s Waterfall method version 2011 [10], waterfalls method is a systemic and sequential development of information systems[11], the flow of chatbot development using the waterfall method in this study is described in Figure 2:
Figure 2.Sommerville's version of the Waterfall method
-
a. Requirements defenition
The first step involves defining the system characteristics, analyzing system requirements, setting limitations during development, and outlining the goals of the system to be built through communication with users who will utilize the system. This is followed by system specifications.
-
b. System and software design
The second stage of system design begins by breaking down requirements into various components, such as hardware and software, and creating a comprehensive system architecture.
-
c. Implementation and unit testing
In the third step, software implementation is designed as a cohesive unit. Testing is also conducted to verify whether each unit is built to meet the specified needs and requirements.
-
d. Integration and system testing
The fourth step involves converting applications designed by units into a complete system to ensure that the applications align with user requirements. After this process, the system can be delivered to users.
-
e. Operation and maintenance
The fifth step is the longest phase in the system development series. After the system is deployed and in use, improvements are made to address errors not identified in previous stages. Additionally, enhancements to unit program implementations are made to further improve the system's services.
The components used for researching the implementation of a chatbot as a patient information service. The Chatbot program is constructed using several materials, as described below.
Chatbot is a system capable of responding to messages sent by users. The term 'chatbot' is derived from 'chat' and 'bot.' Chat refers to communication conducted through text or messages, while a bot is a program with the knowledge to respond to given commands[12]. Chatbot is capable of providing information quickly and efficiently, thus serving as a bridge between patients and the hospital to obtain information.
Python is an interpretative programming language that is flexible with a design philosophy focused on code readability[13]. It is considered a language that combines capability with clear code syntax and is rich with a large set of standard library features. Python supports various programming paradigms, primarily but not limited to object-oriented programming, imperative programming, and functional programming[14]. One of the convenient features of using Python is the abundance of libraries available. In this research, the python-telegram-bot library is utilized, allowing connection through a Telegram bot.
Telegram is an instant messaging service that users can use to communicate online after completing the account registration steps in the Telegram application. The advantages of chatbots include being a free application, sending messages faster, running lighter, accessible from various devices, and having API features that can be used to design chatbots[15]. To design a chatbot for integration with the Telegram application, start by registering a new bot on your account with Bot Father through the Telegram application. A Telegram bot is a special feature owned by Telegram, with specific functions and operates automatically according to user commands or requests[16]. For responses and data to answer patient questions, they will be stored in a database. In this research, a MYSQL database is used.
MySQL is a server program with the ability to send and receive data quickly using SQL (Structured Query Language) commands. MySQL can access databases that act as servers and programs or applications within them[17]. The results of chatbot data management are stored in the MySQL database named Madani.
Discussing the results of chatbot implementation and system testing. The chatbot discussion covers the implementation of the Telegram chatbot for hospital information services, database implementation, chatbot interface implementation, system testing, and User Acceptance Testing (UAT) reviews. The mentioned results represent an analysis of the tested application developed.
The results of the system design will be explained through a flowchart, as outlined below:
-
a. Use case Diagram
Use cases are abstractions of the interactions between the system and actors. It works by describing the types of interactions between users of the system and the system itself through stories about how the system is used[18]. Use cases are also defined as a structure for describing how the system appears to the user. Simultaneously, use case diagrams facilitate communication between analysts and users, as well as between analysts and customers[19]. The following use cases that are applied to build a telegram chatbot can be seen in figure 3.
Figure 3. Use case Diagram
-
b. Flowchart chatbot
Flowchart or flow diagram is a diagram that displays the steps and decisions to carry out a process within a program. The following is the process flowchart of the Telegram bot, as depicted in Figures 4 and 5
Figure 4.Patient Chatbot Flowchart
Figure 5.Flowchart Chatbot Admin
The implementation of the information service at Madani Hospital focuses on providing information such as doctor schedules, appointment scheduling with doctors, patient schedule information, hospital location information, and information about the Emergency Room (UGD) based on the Telegram platform. Within the hospital information service, there are two actors: the admin and the patient. The initial step taken by the admin is the authentication of the chatbot, as shown in Figure 5.
The admin dashboard displays features that can be accessed by the admin, including manipulating doctor schedules, patient schedules, verifying patients, and compiling patient data, as illustrated in Figure 5.
The patient dashboard contains commands accessible to patients, including information about doctor schedules, registration or appointment scheduling with doctors, patient schedule information, hospital location information, and Emergency Room information, as shown in Figure 6.

Figure 6. Admin dashboard

Figure 7. Patient dashboard
As for the features on the face of the patient like those in figure 6 as follows:
-
a. Command /jadwal_dokter (doctor_schedule) provides doctor schedules. To view the doctor's schedule, patients can search based on the selected specialty. The chatbot then sends the doctor's schedule.
-
b. Command /pendaftaran (registration) includes registration pathways that patients can follow:
-
• Umum (General) pathway, where patients are requested to provide a photo of the family card and a referral letter.
-
• BPJS pathway, where patients are asked for a referral letter and a photo of the BPJS card.
-
• UHC pathway, where the chatbot will later ask for patient information until providing a booking code.
-
c. Command /jadwal_patient (patient_schedule) displays the schedule of patients who have registered in the chatbot by entering the provided booking code during registration.
-
d. Command /informasi UGD (emergency_information) provides contact information that can be reached in case of an emergency.
-
e. Command /lokasi (location) provides the hospital's location. Users can either click or type /lokasi in the chatbot, and the chatbot will provide the hospital's location.
While the features on the admin interface like image 7 are as follows:
-
a. Doctor Schedule Menu: In this menu, the admin can add, modify, and delete doctor schedules in the database.
-
b. Patient Schedule Menu: In this menu, the admin can modify and delete patient schedules.
-
c. Recap Menu: This menu includes the verification of booking codes from patients, which serves to verify that patients have arrived at the hospital. Within the Recap menu, there is also a section for compiling data from verified patients, and the chatbot will provide a file in .xls or Excel format. Additionally, this menu includes commands to view patient schedules and patient registration data.
-
d. Admin Account Menu: In this menu, the admin can create new admin accounts and delete existing admin accounts.
Chatbot testing done using the black box method. Test cases are set for 16, and the testing stages of 16 cases, the chatbot application is 100%. The method consists of testing each test case, input given, and status for each component as indicated at table 1.
Table 1.Black Box testing results
Test components |
Input |
Status |
Surgery see doctor's schedule |
The patient enters the #jadwal_dokter message comment and selects a specialist |
Succeed |
Make an appointment with a doctor |
The patient enters a #pendaftaran message comment and enters patient data |
Succeed |
Surgery to view the patient's schedule |
Patient enters message comment #jadwal_patient (booking code) |
Succeed |
Operation to view location information |
The patient enters a message comment #lokasi |
Succeed |
Surgery to view emergency room information |
The patient enters the message comment #informasi_UGD |
Succeed |
Error handling |
Users enter message comments that are not available in the chatbot |
Succeed |
Opeasi create doctor's schedule |
Admin enters message comment #tambah_jadwal_dokter and enters doctor's data |
Succeed |
Surgery doctor schedule update |
Admin enters message comment #update_jadwal_dokter and enters doctor's schedule data |
Succeed |
Surgery delete doctor's schedule |
Admin enters message comment #delete_jadwal_dokter and enters doctor's schedule data |
Succeed |
Surgery updates patient schedule |
Admin enters message comment #update_jadwal_dokter and enter booking code |
Succeed |
Patient schedule delete surgery |
Admin enters message comment #delete_jadwal_dokter and enter booking code |
Succeed |
Patient verification |
Admin enters #verifikasi |
Succeed |
Data recap |
message comment and enters booking code The admin enters #rekap |
Succeed |
message comment and enters the patient data range | ||
Operation to view tracking |
Admin enters message |
Succeed |
data |
#Data_pendaftaran_pasien and enters registration date | |
Create admin operation |
Admin enters message #tambah_akun and enters admin data |
Succeed |
Opesai delete admin |
The admin enters the message #delete_admin and enters the account name |
Succeed |
UAT (user acceptance testing), also known as user acceptance testing, is the process of implementing anexamination based on the results of a document that can be used as evidence of requests toaccept and fulfill needs. The questionnaire is given to obtain feedback from respondents orusers about its use. The UAT (User Acceptability Testing) questionnaire was distributed face-to-face to 20 prospective patients. The questionnaire includes 7 questions with answers thathave levels, namely level 1 (Not Good), level 2 (good enough), level 3 (Good) and level 4 (very good).
Table 2. UAT Results
No |
Question |
1 (not good) |
Measuring scale | ||
2 (good enough) |
3 (good) |
4 (very (good) | |||
1 |
Do you find it helpful to use chatbots as a medium for online hospital registration? |
0 |
4 |
7 |
9 |
2 |
Do you think the chatbot feature gives you the convenience of finding information? |
0 |
5 |
10 |
5 |
3 |
Can chatbots save you time in finding information and making appointments with doctors? |
0 |
3 |
9 |
8 |
4 |
After using a chatbot, can the delivery of information about the hospital be conveyed? |
0 |
3 |
5 |
12 |
5 |
What do you think after using the chatbot whether the chatbot feature is working properly? |
0 |
7 |
9 |
4 |
6 |
What do you think about the feasibility of using chatbots as a medium for hospital information services? |
1 |
6 |
5 |
8 |
7 |
In your judgment, is chatbot more practical as a hospital information service medium? |
0 |
5 |
10 |
5 |
AMOUNT |
1 |
33 |
55 |
51 |
Based on the results of the user testing, it shows the highest score at level 3 with a total of 55 points. Level 4 with a total score of 51 points. In addition, for a level 2 scale obtained a
score of 33 points, for a level 1 scale obtained a score of 1 points. The final deduction on the appreciation aspect shows the most appreciation is well with the number of points 55.
From tests done, the study has reached a level of user satisfaction of 77.8%. This indicates that the chatbot application developed is very accurate. This chatbot application is specifically designed to provide services and information for the new pekanmadani hospital. This application has the ability to answer questions asked by the user according to previously given knowledge.
The implementation of the chatbot as an information service for Madani Regional Hospital has been created with components and materials, including the creation of the Telegram API using Python, the design of the database with MYSQL, and the creation of a bot account channel on Telegram that has been prepared. The chatbot creation is based on the UML model design for each process flow and connected to the database. The Black Box method is used to test the chatbot program to ensure that the user-serving chatbot functions properly. Testing starts from the patient's chatbot access test, patient registration test, patient chatbot function test, chatbot admin authentication test, admin chatbot CRUD test, admin chatbot function test, admin registration test, error handling test. Based on the black-box testing in this study, it resulted in a 100% success rate, and in the User Acceptance Test (UAT) results, it showed a high value with an accuracy rate of 77.8%, indicating an Excellent level. This indicates that the developed application can answer questions based on the knowledge provided previously effectively. As for the discussion results that can be suggested for further research on this study, the implementation of the database should be better connected to the hospital database to make it more dynamic, especially during registration, to facilitate receptionists.
References
-
[1] Moestopo, “Strategi Gerai Informasi Dan Media Dalam Membangun Citra Positif Melalui
Diseminasi Informasi Publik,” jakarta, Feb. 2012.
-
[2] Prayitno and herman amti, Dasar-Dasar Bimbingan dan Konseling. JAKARTA: Rineka
Cipta, 2004.
-
[3] guntoro, loneli costaner, and lisnawati, “Aplikasi Chatbot untuk Layanan Informasi dan
Akademik Kampus Berbasis Artificial Intelligence Markup Language (AIML),” jurnal teknologi informasi dan komunikasi, vol. 11, pp. 291–300, 2020, doi:
10.31849/digitalzone.v11i2.5049ICCS.
-
[4] A. R. Amalia, R. A. Putri, R. A. Yusuf, and Haerudin, “Konsistensi Komunikasi Terhadap
Pelaksanaan Sistem Informasi Rujukan Terintegrasi (Sisrute) Untuk Meningkatkan Kualitas Pelayanan Rumah Sakit,” journal.lldikti9.id, vol. 6, pp. 40–47, 2022, [Online]. Available: http://journal.lldikti9.id/Ekonomika
-
[5] A. Santhy Toamain, B. Pusat, and S. P. Maluku, “Rancang Aplikasi Chatbot Sebagai
Virtual Asisten Dalam Pelayanan Pengguna Data Di Badan Pusat Statistik Provinsi Maluku,” Jurnal Teknologi Informasi, vol. 7, 2021, [Online]. Available:
http://ejournal.urindo.ac.id/index.php/TI
-
[6] S. P. Nova and M. Firdaus, “Efektivitas Komunikasi Aplikasi Telegram Sebagai Media
Informasi Pegawai Pt.Pos Indonesia (Persero) Kota Pekanbaru,” Pekanbaru, Apr. 2018.
-
[7] wahyunanda kusuma pertiwi and tudha pratomo, “Telegram Makin Populer, Kini Telah
Diunduh 1 Mliyar Kali,” kompas.com.
-
[8] A. A. Arifiyanti, R. Permatasari, A. Rezha, and E. Najaf, “Kajian Ilmiah Informatika dan
Komputer Asisten Virtual sebagai Pusat Layanan Informasi pada Perguruan Tinggi di Indonesia-A Systematic Literature Review,” Media Online), vol. 4, no. 2, pp. 740–745, 2023, doi: 10.30865/klik.v4i2.1222.
-
[9] M. Hanifah, “Pemanfaatan Teknologi Informasi dan Komunikasi Pada Aplikasi Halodoc
Sebagai Telemedicine Check Covid-19 dalam Upaya Preventif Penyebaran Virus Corona di Sleman Yogyakarta Utilization of Information and Communication Technology in the Halodoc Application as a Telemedicine Check Covid-19 in Preventive Efforts to Spread the Corona Virus in Sleman Yogyakarta,” Yogyakarta, Jan. 2022. [Online]. Available: https://infeksiemerging.kemkes.go.id
-
[10] S. D. Conte, H. E. Dunsmore, and Y. E. Shen, Software Engineering Metrics and
Models. Redwood City: Benjamin-Cummings Publishing Co., Inc., 1986.
-
[11] E. Susanti and I. Artikel, “ETNIK: Jurnal Ekonomi-Teknik Sistem Informasi Manajemen
Asset Berbasis Web,” ETNIK: Jurnal Ekonomi-Teknik, no. 1, p. 12, 2021.
-
[12] K. O. Sanjaya, I. Gede, B. Subawa, I. Kadek, and A. Asmarajaya, “Perancangan Sistem Informasi Surat Menyurat Terintegrasi (SUMATRI) Berbasis Website dan Android,” denpasar, Dec. 2020. doi: https://doi.org/10.24843/JIM.2020.v08.i03.p07.
-
[13] wikipedia, “Python (bahasa pemrograman),” wikipedia. Accessed: Oct. 01, 2023.
[Online]. Available:
https://id.wikipedia.org/wiki/Python_(bahasa_pemrograman)#:~:text=Python%20adalah %20bahasa%20pemrograman%20tujuan,penggunaan%20spasi%20putih%20yang%20s ignifikan.
-
[14] T. Siti, N. Uin, S. Gunung, and D. Bandung, “Hack Database Website Menggunakan Python dan Sqlmap Pada Windows,” 2016. [Online]. Available:
https://www.researchgate.net/publication/303372599
-
[15] K. Qamar and S. Riyadi, “Efektivitas Blended Learning Menggunakan Aplikasi
Telegram,” malang, Jan. 2018.
-
[16] H. Soeroso et al., “Penggunaan Bot Telegram Sebagai Announcement System pada
Intansi Pendidikan,” seminar master, vol. 2, pp. 45–48, Nov. 2017.
-
[17] Gede Indrawan, Database MySQL dengan Pemograman PHP. Depok: PT RajaGrafindo Persada, 2019.
-
[18] dkk widodo, Menggunakan UML. bandung, 2011.
-
[19] E. Nila and I. Afrianto, “Rancang Bangun Aplikasi Chatbot Informasi Objek Wisata Kota Bandung Dengan Pendekatan Natural Language Processing,” Jurnal Ilmiah Komputer dan Informatika (KOMPUTA), vol. 49, no. 1, 2015, [Online]. Available:
Implementation of Telegram Chatbot as Information Service of Madani Hospital Pekanbaru 198
(Aldi Hariansyah)
Discussion and feedback