Implementation of Telegram Chatbot as Information Service of Madani Hospital Pekanbaru

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.


Introduction
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.

Research Method / Proposed Method
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.

Stages of the Research
The research stages of implementing a chatbot as an information service at Madani Hospital Pekanbaru are as described in Figure 1: 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: 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.

Literature Study
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
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 Programming Language
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
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
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.

Result and Discussion
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.

System Design
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 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.

System Implementation
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.
As for the features on the face of the patient like those in figure 6   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.

Conclusion
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.

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

Figure 2 .
Figure 2.Sommerville's version of the Waterfall method a. Requirements defenitionThe 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 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 Hariansyah)

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 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 Hariansyah)

Figure 4 .Figure 5 .
Figure 4.Patient Chatbot Flowchart 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.