Hello! This is Ilwon Station Exit 1 Pharmacy.
While running a pharmacy, I was thinking about how to print medicine labels more accurately and efficiently,
and recently I developed a customized pharmacy label program using artificial intelligence (AI).
To my surprise, I received help from an AI called Grok from xAI in this process!
Today, I would like to share this interesting experience with AI with you.
1. Why was a pharmacy label program needed?
At our pharmacy near Samsung Seoul Hospital,
there is a task that must be done when delivering a prescription to a patient.
That is, printing a label.
- Drug name
- Dosage (e.g., twice a day, 30 minutes after meals)
- Precautions (e.g., causes drowsiness, takes on an empty stomach, etc.)
This information must be accurately written on the medicine bag so that patients can take the medicine safely.
Since patients receiving treatment at Samsung Seoul Hospital often take various medications,
a medication guide label is essential.
However, there were several problems with the existing method.
🔴 Problems with existing label printing methods 🔴
✔️ Handwriting → Time-consuming and poor readability
✔️ Using existing pharmacy computer programs → Label printing for individual medications is possible, but printing labels for ready-made use such as after breakfast, before breakfast, and before bed is not possible
✔️ Increased possibility of mistakes during busy times → May affect patient safety
I wanted to solve these problems and decided to create a customized label program for our pharmacy!
However, I didn't know anything about coding and wasn't a computer programming expert,
so I didn't know where to start.
That's when I met Grok.
(I started with chatGPT first, but Grok performed commands, responses, and tasks better,
so I did the overall work with Grok.)
2. Development process with artificial intelligence Grok
Grok is an artificial intelligence developed by xAI that is a powerful tool that converses like a person and solves problems.
At first, I had doubts about whether AI could really help with program development. But when I used it myself, it was much smarter and more practical than I thought.
🔹 What I asked Grok
- "I want to make a label program to be used in a pharmacy. How do I get started?"
- "Can I add a function to automatically enter the drug name and dosage?"
- "Is there a way to make the label design neat?"
🟢 Grok's answer and solution
✔️ Python is recommended as a programming language → Even beginners can learn it easily
✔️ Use Tkinter → Create an intuitive GUI (graphical user interface)
✔️ Use SQLite database → Build a system that automatically enters the drug name and dosage
✔️ Connect the printer with the win32print module → Print immediately when you click the button
Grok provided step-by-step code and explanations based on my questions.
Thanks to him, I was able to develop it by following along one by one.
3. Actual development process - This is how it was made!
The main functions of the label program developed with AI are as follows.
1) Patient name input function
2) Multiple selection of dosages is possible by clicking (ex. after breakfast, before bedtime)
3) When directly entering the dosage, if it exceeds the width of the label paper, it is automatically resized and printed in the center
4) Clean label design & compatibility with Bigsolon label printer and label paper
Even with AI Grok, coding and program were not completed with one comment.
Whenever errors such as font, size, alignment, and compatibility issues occur,
we analyzed the cause and found a solution,
so that we could create a program suitable for use in pharmacies.
Below is the actual label printed with the final program used.
You can download the label printing program code that I used from the attached file
4. Did you actually use it in the pharmacy?
After introducing this program, the efficiency of pharmacy work has greatly improved!
It is so convenient because I don't have to write the patient names one by one by hand. Especially for patients who take multiple medications at different times,
the biggest advantage is that accurate patient name input and label printing are possible.
5. Future plans - Towards a smarter pharmacy!
Starting with the customized label program we created with Grok this time,
we plan to continue to improve pharmacy operations in a smarter way in the future.
🔹 Programs to be developed additionally
✅ Wholesale medicine receipt management system using 2D barcodes → Currently in operation, checking for errors and supplements
✅ Pill counting Android app development → Simple shooting without limit on the number of shots
And developing an app that can automatically save and print
✅ Developing real-time subway information notifications for up and down lines at Ilwon Station on Line 3 through the Seoul Open Data Plaza OPEN API (service for patients and pedestrians passing by in front of the pharmacy)
We will receive help from Grok throughout this entire process.
We experienced firsthand that AI is not just a simple search tool, but something that can actually help.
6. Conclusion - Please tell us what you think! Through this experience, I realized that using AI can make pharmacy operations much smarter.
If you have any questions about this program or if there is anything you would like to see improved,
Please visit the pharmacy at any time or leave a comment!
We will reflect your feedback to create a better program.
Have a healthy day today!
Samsung Medical Center(Samsung Seoul Hospital) Prescription Preparation /
Ilwon Station Exit 1 Pharmacy







