Dentalpin
Software de gestión de clínica dental gratis y open source: agenda, pacientes, odontograma, presupuestos y facturación. Te llevas el código, lo instalas donde quieras, sin cuotas por sillón ni por den
翻译准备中
尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 README ↗Zamboanga Regional Medical Center's online system for patients, staff and referring facilities.
A web app with two patient services:
Patients get SMS messages at each step, plus automatic reminders.
Requires Node.js 22. Without a DATABASE_URL, the app uses a built-in database stored in ./data, so nothing else needs installing.
npm install
cp .env.example .env # Windows: copy .env.example .env
npm start # http://localhost:3000
npm test
On Windows PowerShell, if npm is blocked by "running scripts is disabled", type npm.cmd instead of npm.
| Page | URL |
|---|---|
| Home | / |
| Request records | /request-records |
| Book OPD | /book-opd (add ?department=PEDIA to preselect a clinic) |
| Track / cancel | /track |
| Staff panel | /admin (first login: admin / admin123, or the ADMIN_USERNAME / ADMIN_PASSWORD you set) |
Vercel runs the API as a serverless function and serves the pages from public/. Supabase stores the data. The app creates its tables automatically on first use.
postgresql://postgres.abcdefgh:[YOUR-PASSWORD]@aws-0-ap-southeast-1.pooler.supabase.com:6543/postgres[YOUR-PASSWORD] with your database password. If the password contains symbols such as @, # or /, reset it to letters and numbers only in Project Settings → Database.In Vercel, open your project and go to Settings → Environment Variables. Add these:
| Name | Value |
|---|---|
DATABASE_URL | the Supabase connection string from step 1 |
SESSION_SECRET | a long random string (40+ letters and numbers) |
ADMIN_PASSWORD | the first staff password (you can change it later in Settings) |
CRON_SECRET | another long random string, used for reminders (step 3) |
HOSPITAL_NAME | your hospital's name |
SMS_PROVIDER, SEMAPHORE_API_KEY, … | see SMS setup |
Then go to Deployments, open the ⋯ menu on the latest deployment and choose Redeploy. Environment variable changes only take effect after a redeploy.
Vercel's free plan only runs scheduled jobs once a day, so reminders use a free external scheduler:
https://YOUR-APP.vercel.app/api/cron/reminders?key=YOUR_CRON_SECRET.Each call sends any reminders that are due. A reminder is never sent twice, even if calls overlap. You can test the URL in your browser: it should show {"ok":true,"sent":0}.
anon key anywhere.SESSION_SECRET.RECORDS_CLAIM_DAYS). If that date falls on a weekend or a closed date set in Settings, it moves to the next working day, so a Friday request is claimable on Monday.On the last step of a records request (email is required), the requester chooses:
Staff workflow (Records Requests; filter by Digital copy, ID to check or Assigned to me):
Fees and online payment. Each document shows its fee per copy, and the form keeps a running total payable. The Review step shows the breakdown, and the total is saved with the request (for hardcopies it's for reference). Digital copy requesters pay the total by scanning the GCash / InstaPay QR code (a Save QR code button lets phone users upload it in their app), then upload a screenshot of the receipt and optionally the payment reference number. Staff check the receipt together with the ID in Verify ID & payment. Administrators set the fees, replace the QR code (e.g. with the hospital's official account) and edit the payment instructions in Settings → Fees & online payment. The default fees are in src/catalog.js and the default QR is public/img/payment-qr.jpg.
ID photos and receipts are visible only to staff with Records access and are deleted automatically ID_PHOTO_RETENTION_DAYS (default 30) days after the request is released, rejected or cancelled. Deletion runs with the scheduled reminders job. The dashboard shows how many digital requests are waiting for an ID check.
When the requester is not the patient, the form also asks for the patient's address. After submitting, the requester can download the hospital's Authorization Letter (FM-HHIM-05 Rev 2) as a Word file, already filled in:
The requester prints it, has it signed by the patient and the representative, and brings it with both valid IDs. The letter can be downloaded again from Track / Cancel, and staff can download it from the Letter button in the Records list. The template is templates/authorization-letter.docx; if the form is revised, the blanks are found by their paragraph IDs in src/letter.js.
REMINDER_DAY_BEFORE_TIME.REMINDER_HOURS_BEFORE hours before the appointment.Clinic schedules change every month, so they're managed in Admin → OPD Schedules, by Administrators and by Staff with OPD access:
Booking (dates and time slots), the Hospital Directory (this month and, once published, next month), the FAQ assistant's schedule answer and SMS messages all follow these schedules. Changing a schedule doesn't move existing appointments; reschedule those from OPD Appointments.
Patients look up a request with its reference number and their mobile number. Records references start with R- and appointment references start with A-.
The public Hospital Directory page (/directory) is a phone-friendly guide with five sections:
Administrators manage everything in Admin → Directory:
Starter content (the OPD clinics, the Hospital Health Information Management Section (HHIMS), the Emergency Room and four transaction guides) is created on first start. Locations, phone numbers, maps and contact details are left blank on purpose. Please fill them in with the hospital's real information.
Referring facilities use the Referral Portal at /facility, with their own accounts. These are separate from staff accounts and can't open the staff panel. There they can:
Staff with the Referrals permission (Users → Access; administrators always have it) use Referrals in the staff panel:
EXPORT_COLUMNS in src/referrals.js.Every public page has a Questions? Ask us button that opens a chat window. Visitors can tap a suggested question or type their own. The assistant picks the staff-written FAQ whose keywords best match the message, so it only ever gives answers you have approved.
Administrators manage it in Admin → FAQs:
/track, or an https:// address).claim, pick up, kailan, kanus a).{hospital}, {claim_days}, {office_days}, {opd_hours}, {documents}, {clinic_schedule}.A set of starter FAQs is created the first time the app starts. Review them, especially fees and office hours, and edit them to match the hospital's actual policies.
Staff accounts are managed in Admin → Users by administrators. There are two roles:
Each Staff user has two access checkboxes: Records Requests and OPD Appointments. They need at least one. A Records-only user doesn't see the OPD tab, OPD dashboard numbers or OPD text messages, and the server refuses OPD requests from them; the same applies the other way round. Access changes take effect on the user's next click, without logging them out. Administrators always have both.
Usernames aren't case-sensitive. Resetting a user's password, changing their role or deactivating them signs them out of every device immediately. You can't deactivate or demote yourself, and there is always at least one active administrator. Each records request and appointment shows which user last changed it.
The first administrator is created from ADMIN_USERNAME / ADMIN_PASSWORD the first time the app starts.
Everything typed into the forms is converted to capital letters, both in the browser and when it's saved. Passwords, usernames and email addresses are kept exactly as typed.
Set SMS_PROVIDER in .env to one of these:
console: messages are only printed to the server log. This is the default and is meant for testing.unisms: UniSMS, a Philippine gateway. Set UNISMS_API_KEY to your UniSMS secret key, and optionally SMS_SENDER_NAME to a sender ID registered with UniSMS.semaphore: Semaphore, a Philippine gateway. Set SEMAPHORE_API_KEY, and optionally SMS_SENDER_NAME (it must be registered with Semaphore).twilio: set TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN and TWILIO_FROM.Mobile numbers are stored in E.164 format, so 09171234567 becomes +639171234567. You can change the message wording in src/messages.js.
src/catalog.js. Clinics and their schedules: Admin → OPD Schedules..envapi/index.js Vercel serverless entry (wraps the Express app)
vercel.json Vercel routing: /api/* → function, everything else → public/
src/
server.js Express app, cron endpoint, local server + reminder scheduler
config.js .env settings
catalog.js document types, statuses, starting clinic list
clinics.js OPD clinics and monthly schedules (carry-over, open days, slots)
db.js Postgres schema + drivers (Supabase via DATABASE_URL, else embedded PGlite)
scheduling.js pickup-date & OPD slot availability
reminders.js background SMS reminder job
sms.js SMS providers + logging
messages.js SMS templates
routes/ public and admin JSON APIs
public/ HTML/CSS/JS front end (no build step)
test/ node:test API + reminder tests (set TEST_DATABASE_URL to run against a throwaway Postgres)
ADMIN_PASSWORD and a random SESSION_SECRET. Vercel serves HTTPS automatically. If you self-host, put the app behind nginx or Caddy for HTTPS.pg_dump). Note that free Supabase projects pause after a week with no activity.public/js/common.js, since the app handles health information under RA 10173.SUBMIT_RATE_LIMIT), and staff login 10 attempts (LOGIN_RATE_LIMIT). These are kept in memory per server instance, so on Vercel they are only a light safeguard.