PIL Box – سیستم یادآوری بهتر دارو
مطالعات نشان میدهد که عواقب عدم مصرف داروها طبق دستور پزشک توسط بیماران میتواند جدی باشد، بهویژه در بیماران مسنتر. با میکروکنترلرها و سنسورهای ارزان قیمت امروزی (و انگیزه رادیو Shack / Instructables) مسابقه میکرو کنترلر) فکر کردم باید راه بهتری وجود داشته باشد تا مطمئن شوم بستگان مسن من داروهای خود را طبق برنامه مصرف می کنند. این دستورالعمل توضیح میدهد که چگونه میتوانید از یک میکروکنترلر Parallax Propeller برای ایجاد قرصدهنده اینترنتی Logging مبتنی بر پروانه یا به اختصار PIL Box استفاده کنید.
PIL Box چیست؟
PIL Box اصلاحیهای برای یک تلگراف استاندارد قرص است، از یک میکروکنترلر Parallax Propeller برای پیگیری زمانی که بیمار باید داروهای خود را مصرف کند، استفاده میکند. تایمر شمارش معکوس را یک ساعت قبل از زمان مصرف نمایش می دهد و پس از رسیدن به زمان، پیام های شنیداری، پیام های LED 7 Segment تولید می کند و یک LED زیر محفظه صحیح روشن می کند تا باز شود. هنگامی که بیمار یک محفظه را باز می کند، یک حسگر آن را تشخیص می دهد و رویداد را در یک فایل گزارش قابل دسترسی به اینترنت ثبت می کند (در نتیجه به بستگان یا ارائه دهندگان مراقبت های بهداشتی اجازه می دهد تا داروها را به موقع دریافت کنند). مهمتر از آن، PIL Box این واقعیت را ثبت می کند که یک بیمار زمان خدمت خود را از دست داده است و حتی یک پیام توییتری برای هشدار دادن به بستگان و ارائه دهندگان مراقبت های بهداشتی ارسال می کند.
قطعات مورد نیاز
مرحله 1: ویژگی های طراحی قرص PIL Box متصل به اینترنت
- یادآوری زمان دوز - یادآوری خودکار، واضح، به بیمار، اطلاع رسانی از زمان مناسب برای مصرف داروهای خود.
- نمایش زمان "دوز بعدی" - با فشار دادن دکمه قرمز رنگ Enter در پانل جلویی، کاربر می تواند از مشاهده زمان فعلی روز به مشاهده زمان برنامه ریزی شده بعدی دارو تغییر مکان دهد.
- نور پس زمینه LED - LED های نصب شده در زیر تلگراف، محفظه مناسبی را که باید برای زمان مصرف فعلی باز شود، برجسته می کنند.
- یادآورهای زبان انگلیسی شنیداری از طریق شیء Parallax Voice Synthesizer و جک بلندگو پروانه ارائه می شود.
- ثبت محلی و از راه دور - این دستگاه تاریخ و زمان دسترسی بیمار به محفظه های توزیع کننده و همچنین بسیاری از موقعیت های خطای عدم انطباق (مانند زمان از دست رفتن دوز) را ثبت می کند. گزارشها هم در یک فایل قابل دسترسی از وب سرور و هم به صورت محلی روی کارت microSD پروانه نوشته میشوند. من فایل را به صورت محلی ثبت میکنم تا در مورد خرابی سرور رایانه شخصی یا قطع برق رسیدگی کنم (با فرض اینکه PIL Box از ویژگی اختیاری تامین باتری 9 ولتی استفاده میکند).
- گزارشهای دسترسی به اینترنت - ثبت از راه دور به یکی از اعضای خانواده یا سایر ارائهدهندههای مراقبت اجازه میدهد تا بیمار را از راه دور بررسی کند و تأیید کند که آنها طبق برنامه دارو مصرف میکنند. حتی ممکن است بیمار خودش از لاگ استفاده کند. موردی را در نظر بگیرید که در آن بیمار به محل کار خود می رسد و نمی تواند به خاطر بیاورد که آیا داروهای صبح خود را مصرف کرده است یا خیر، با PIL Box یک رکورد به روز از داروهای مصرف شده در تلفن هوشمند یا رایانه تحت شبکه شما موجود است.
- توییتر فعال شد – PIL Box یک برنامه توییتر ثبت شده است و با استفاده از REST APIها، سرور ثبت از راه دور مبتنی بر پایتون، پیامهای توییتر را ارسال میکند تا ارائه دهندگان مراقبت را در مورد رویدادهای دوز از دست رفته مطلع کند.
- ظروف استاندارد قرص کم هزینه - جعبه PIL از یادآوری های استاندارد قرص 7 روزه ارزان قیمت ساخته شده توسط Ezy Dose استفاده می کند. طراحی نمونه اولیه به این امکان را میدهد که ظرف به راحتی برداشته شود، و به ارائهدهنده مراقبتها این امکان را میدهد تا به صورت هفتگی یک ظرف داروی از پیش پر شده جدید را بریزند و ظرف خالی را برای ذخیره مجدد جمعآوری کند. توانایی حذف جعبه به کاربران کمک می کند تا به داروهای خود نیز برسند.
- پیامهای خطای عدم انطباق - اگر بیمار زمان مصرف دارو را از دست بدهد، ظرف قرص را جایگزین کند یا زود به دارو دسترسی پیدا کند، پیامهای خطای دیداری و شنیداری ایجاد میشود و چنین مسائلی در فایلهای گزارش محلی و راه دور ثبت میشوند.
- طراحی قابل توسعه - نمونه اولیه تنها از هفت محفظه پشتیبانی می کند، یکی برای هر روز هفته، اما بدیهی است که بسیاری از بیماران به سه یا حتی چهار وعده در روز نیاز دارند. پروانه دارای 20 پین ورودی/خروجی کاملاً رایگان است و من به 12 پین برای راه اندازی صفحه نمایش LED نیاز داشتم، بنابراین از رجیسترهای شیفت برای ارائه پین های اضافی استفاده کردم. از آنجایی که من از برد رجیستر شیفت Tymkrs Shift Me V1 استفاده کردم، نه تنها میتوانستم 8 سوئیچ و 8 LED را در حالی که فقط 6 پین اختصاص میدادم، کنترل کنم، میدانستم که میتوانم بسیاری از این بردها را به هم متصل کنم، بنابراین به راحتی هر تعداد کانتینر مورد نظر را پشتیبانی میکنم. به عنوان مثال، با تغییر کمی در طراحی، میتوانیم به سادگی 3 برد ثبت شیفت اضافی اضافه کنیم که به ما امکان میدهد 32 LED و 32 سوئیچ را کنترل کنیم و بنابراین از سازماندهنده قرص هفتگی Ezy Dose 4X/Day که دارای 28 محفظه جداگانه قرص است، پشتیبانی میکنیم.
نمایش ویدیویی
اگر یک عکس ارزش هزار کلمه دارد، پس یک ویدیو باید حتی بهتر باشد… لطفاً نسخه نمایشی ویدیوی من را در YouTube ببینید
مرحله 2: موارد داخلی، چگونه کار می کند؟
چگونه کار می کند؟
توزیع کننده قرص ثبت نام اینترنتی مبتنی بر پروانه (PIL Box) دارای هیئت آموزشی پروانه Parallax در قلب خود است.
- هنگام شروع، PIL Box از زمان فعلی و زمان دوز مصرفی بیمار آگاه است.
- زمان دوز بعدی تا زمانی که کمتر از یک ساعت فاصله داشته باشیم نمایش داده می شود.
- هنگامی که یک ساعت فاصله داریم، یک تایمر شمارش معکوس روی صفحه نمایش LED 4 رقمی نشان داده می شود. این تایمر در یک چرخ دنده پروانه جداگانه اجرا می شود و به برنامه اصلی اجازه می دهد تا به بررسی دکمه ها، شرایط خطا و رویدادهای گزارش ادامه دهد.
- هنگامی که تایمر شمارش معکوس به صفر می رسد، LED مناسب روشن می شود که نشان می دهد بیمار باید به کدام قسمت دسترسی داشته باشد. یک یادآوری سنتز شده صوتی نیز پخش می شود.
- اگر بیمار محفظه مناسب را باز کند، یک ورودی گزارش به فایلهای گزارش محلی و راه دور اضافه میشود.
- اگر بیمار محفظه اشتباهی را باز کند یا به محفظه دسترسی نداشته باشد، یک پیام خطا پخش می شود و یک رویداد خطا ثبت می شود.
- زمان بعدی دوز محاسبه می شود و دوباره شروع می کنیم.
برای جزئیات بیشتر: یک قرص متصل به اینترنت ایجاد کنید
در ادامه، متن انگلیسی این مطلب را میتوانید مشاهده نمایید:
The P.I.L. Box – A Better Medication Reminder System
Studies show the consequences of patients not taking medications according to doctor’s orders can be serious, especially in older patients.With today’s low cost micro-controllers and sensors (and the incentive of the Radio Shack / Instructables Micro Controller Contest) I thought there must be a better way to ensure my elderly relatives are taking their medications on schedule. This Instructable describes how you can use a Parallax Propeller micro-controller to create the Propeller based Internet Logging Pill Dispenser…or the P.I.L Box for short.
What is the P.I.L. Box?
The P.I.L. Box is a modification to a standard pill dispenser, it uses a Parallax Propeller micro-controller to keep track of when a patient should take their medications. It displays a count down timer one hour before dosage time and then when the time arrives, it generates audible messages, LED 7 Segment messages and lights an LED under the correct compartment to be opened. When the patient opens a compartment, a sensor detects this and records the event to an internet accessible log file (thereby allowing relatives or health care providers to verify meds are being taken on time). More importantly the P.I.L Box logs the fact that a patient has missed their serving time and even sends a Twitter message to alert relatives and health care providers.
Parts Needed
- 1 Microcontroller – For this project I used a Parallax Propeller microcontroller (Board of Education model), but an Arduino would work as well.
- 1 Pill Dispenser – an Ezy Dose XL 7 Day Pill Reminder with Push Button Pop-up Covers
- 1 Project Box – I used a wooden ex-toolbox from a salvage store
- 8 Micro-switches – one for each day of the week and one to detect the pill box is missing
- 1 Momentary switch – used to answer prompts from the microcontroller
- 1 4-digit seven-segment display – displays messages
- 2 Shift registers or for easier wiring, I used a Shift-me! card from tymkrs.com
- 1 breadboard
- wire
- 1 speaker – the Propeller BOE has a 3.5mm headphone jack and voice synthesized messages are played through the speakers
- 1 PC – a serial connection over USB is used to log events to the web server.
- (optional) XBee modules – instead of a USB connection as shown in the attached video, you could optionally use XBee modules to send messages wirelessly from the PIL Box to the PC
Step 1: Design Features of the P.I.L. Box Internet Connected Pill Dispenser
- Dosage Time Reminders – Automated, clear, reminders to the patient, informing of the proper time to take their medications.
- “Next Dosage” Time Display – by pressing the red Enter button on the front panel, a user can switch from viewing the current time of day, to viewing the next scheduled medication time
- LED backlighting – LEDs mounted beneath the dispenser highlight the proper compartment to be opened for the current dosage time.
- Audible English language reminders are provided by way of the Parallax Voice Synthesizer object and Propeller speaker jack.
- Local and Remote Logging – The device logs the date and time a patient accesses the dispenser compartments, as well as many non-compliance error situations (such as a missed dosage time). Logs are written to both a web-server accessible file and locally on the Propeller microSD card. I log the file locally to handle the case of a PC server failure or a power-outage (assuming the P.I.L. Box is using the optional 9V battery supply feature).
- Internet Accessible Logs – Remote logging allows a family member or other care provider to check on a patient remotely and verify that they are taking meds on schedule. A patient may even use the log themselves. Consider the case where a patient arrives at work and can’t remember if they took their morning medications, with the P.I.L. Box an up to date record of meds taken is available on your smart phone or networked computer.
- Twitter enabled – the P.I.L. Box is a registered Twitter application and by use of REST APIs, the python-based remote logging server sends Twitter messages to notify care providers about missed dosage events.
- Low Cost Standard Pill Containers – P.I.L. Box uses inexpensive standard 7 Day Pill Reminders made by Ezy Dose. The prototype design allows the container to easily be removed, enabling a care provider to visit weekly dropping off a new pre-filled med container and collecting the empty container for restocking. Being able to remove the box will help users actually get to their meds as well.
- Non-compliance Error Messages – If a patient misses a dosage time, forgets to replace the pill container or accesses meds early, visual and audible error messages are generated, and such issues are logged to the local and remote log-files.
- Extendable Design – The current prototype supports only seven compartments, one for each day of the week, but obviously many patients would require three or even four servings a day. The Propeller has 20 totally free I/O pins and I needed 12 simply to drive the LED display, so I used shift registers to provide additional pins. Because I used the Tymkrs Shift Me V1 shift register board, not only could I control 8 switches and 8 LEDs while only allocating 6 pins, I knew I could also chain together many such boards, thus easily supporting as many containers as desired. For example, with little design change, we could simply add 3 additional shift register boards, allowing us to handle 32 LEDs and 32 Switches and thus support the Ezy Dose 4X/Day Weekly Pill Organizer, which features 28 separate pill compartments.
Video Demonstration
If a picture is worth a thousand words, then a video must be even better…please see my video demo on YouTube