Dili Medical Center (DMC) · Proposal and blueprint

Integrated Clinic Management System

One patient record shared by registration, outpatient, inpatient, laboratory, imaging, pharmacy and finance, with corporate health plans, outreach services, remote consultation and an online patient portal.

Version 2.0November 2026For presentation to clinic managementIncludes review of the interactive prototype

1. Summary

Dili Medical Center (DMC) has an outpatient department, an inpatient department, a diagnostics department (laboratory and imaging) and a pharmacy and logistics function. Today, information entered in one place is not automatically available in another. This proposal describes a single integrated system in which the patient record is the centre. Every department writes its data to that record, and every authorised user sees what they need from it. The clinic also serves companies and agencies under health agreements, works in the municipalities through outreach visits, and offers remote consultation. The system covers all three.

An interactive prototype of five views (public landing page, staff clinic system, corporate portal, outreach app and patient portal) has been built to test this design. Section 12 records what it shows, what should change before development, and which screens remain to be designed.

One patient, one record

A single patient ID links registration, visits, notes, orders, results, prescriptions and bills.

Orders tied to real stock

A test or drug that cannot be supplied is unavailable to the doctor. Stock alerts reach the lab and pharmacy before it runs out.

Works inside the clinic

The clinical system runs on a server in the clinic. It keeps working if the internet is down.

Online front door

A public landing page promotes the clinic and sends patients, companies and staff to the right place.

Corporate health plans

Companies and agencies enrol employees and dependents under agreed plans. Coverage is checked automatically.

Outreach in the municipalities

Field teams reach the member roster online or offline, record visits, and sync when they have signal.

Remote consultation

Online consultation forms, reviewed by doctors from their own dashboard.

2. Scope and users

Departments covered

  • Registration and front desk, including appointments and queue.
  • Outpatient department (OPD): visits and doctor-patient encounter notes.
  • Inpatient department (IPD): admissions, beds, ward rounds, doctor and nurse notes.
  • Diagnostics: laboratory (tests, results, reagent stock) and imaging (X-ray, ultrasound).
  • Pharmacy and logistics: drug and supply stock, prescriptions, dispensing.
  • Finance: invoices, payments, daily cash, claims.
  • Corporate clients: agreements, health plans, enrolment of employees and dependents, coverage checks, corporate billing.
  • Outreach: clinic team visits to company sites in the municipalities, with the member roster available online or offline.
  • Remote consultation: online forms and doctor review.
  • System administration: users, roles, audit, backups.
  • Online: public landing page and patient portal.

Users and what they see after login

UserWhere they log inDashboard they land on
PatientPatient portal (online)Patient portal home
Front desk officer / adminStaff login (clinic network)Registration and queue dashboard
DoctorStaff loginDoctor dashboard
NurseStaff loginNurse and ward dashboard
Laboratory technicianStaff loginLaboratory dashboard
Radiologist / imaging technicianStaff loginImaging dashboard
Pharmacist / logistics officerStaff loginPharmacy and stock dashboard
Finance officerStaff loginFinance dashboard
Corporate accounts officerStaff loginCorporate accounts dashboard
Company or agency HR officerCorporate portal (online)Corporate portal home
Doctor or nurse on an outreach tripOutreach app (online or offline)Outreach trip and member roster
System administratorStaff loginSystem dashboard

3. System blueprint

The patient is the hub. Each department is a spoke that both reads from and writes to the patient record. Employees of corporate clients and their dependents are ordinary patients with one extra link: the plan that covers them. Departments do not call each other directly. They share the same database, and the status of each record (ordered, collected, resulted, released, dispensed, paid) moves work from one department to the next.

Patient-centred blueprintThe patient record at the centre, connected to registration, outpatient, inpatient, remote consultation, laboratory, imaging, pharmacy, finance, corporate and outreach, and the patient portal. PatientOne ID, one chart RegistrationIdentity, queue OutpatientVisits, notes InpatientBeds, ward rounds Remote consultsOnline forms, review LaboratoryTests, reagents ImagingX-ray, ultrasound PharmacyDrugs and supplies FinanceInvoices, payments CorporatePlans, outreach Patient portalOnline, limited copy
Figure 1. Every module links to the patient. Shaded modules have an online part.

What each spoke records

ModuleWrites to the patient recordReads from the patient record
RegistrationIdentity, contact, next of kin, insurer, appointments, queue numberVisit history, unpaid balances
OutpatientVisits, encounter notes, diagnoses, orders, prescriptionsChart, results, past notes
InpatientAdmissions, bed, doctor ward-round notes, nurse notes, vitals, medication givenChart, orders, results, prescriptions
LaboratorySample status, results, reagent useTest orders, patient details
ImagingStudy status, images, radiology reportImaging orders, clinical question
Pharmacy and logisticsDispensed items, stock movementsPrescriptions
FinanceInvoices, payments, claimsServices and items used, from orders and dispensing
Remote consultationConsultation requests, doctor advice, remote-visit note, prescriptionsChart, previous results, allergies
Corporate and outreachClient agreements, plans, members and dependents, coverage use, outreach visitsEligibility, plan limits, trip roster
Patient portalAppointment requests, messagesReleased results, invoices, prescriptions, appointments

4. Architecture

The system has two zones. The clinical system runs on a server inside the clinic. The public landing page, patient portal, corporate portal, outreach app and remote consultation forms run on a hosted server on the internet and hold only the limited data each user group needs. The clinic server connects outward to the portal; nothing on the internet connects in.

Two-zone architectureAn online zone with the landing page, patient portal, corporate portal and outreach app over a limited online database, linked by outbound-only sync to the clinic server with the staff web app, database, background jobs, workstations and file storage. Online zone (hosted server) Landing pagePublic Patient portalPatients, forms Corporate portalHR officers Outreach appField teams, offline Online database: limited, encrypted copy Outbound-only HTTPS sync, signed Clinic zone (server inside the clinic) Staff web appPHP, role dashboards MySQL databaseOne patient-centred schema Background jobsSync, alerts, backup Staff workstationsBrowser over the clinic network File storageImages, scans, reports
Figure 2. Clinical data stays inside the clinic. The online zone receives only the minimum each user group needs.

If the internet connection fails, clinic work continues unchanged. Updates for the portal wait in a queue and are sent when the connection returns.

5. Landing page and login

The landing page is the online entry door to the clinic. It promotes the clinic's services and gives every kind of user a clear way in.

Page structure

The prototype builds most of the page. The specialists and corporate sections are still to design.

SectionContentPrototype
HeaderLogo and name (Dili Medical Center, Centro Médico de Díli), menu: Services, Corporate Plans, Municipal Outreach, Contact, and one Login buttonBuilt
HeroHeadline, two buttons (Book an appointment, View test results), a consultation card with the emergency line and opening statusBuilt
Promotional cardsFour cards: Complete Wellness Package (featured), Malaria and Dengue Screening, Annual Company Screening, Pediatric and Maternal Care. Editable by the clinicBuilt
Departments gridOutpatient, inpatient, laboratory and imaging, pharmacy, remote consultation, municipal outreachBuilt
SpecialistsPhoto, name, specialty, days availableTo design
Corporate servicesWhat the plans cover, how a company enrols its staff in three steps, a button to contact the clinicTo design
Call-to-action cardsBook an appointment, Remote consultation, Corporate plans, View my resultsBuilt
FooterDMC name, address, opening hours, contacts. Map and language selector still to addPartly built

Public wording. The first draft of the hero listed internal features (chart, reagent stock, offline sync). The prototype now lists what patients and companies get: results online, remote consultation, and corporate and outreach care. The 24-hour emergency claim and the phone number still need to be confirmed.

How the Login button routes people

Step 1User selects Login on the landing page.
Step 2A choice screen asks: patient, company or agency, or clinic staff.
Step 3 · patientGoes to the patient portal login, then to the portal home.
Step 3 · companyGoes to the corporate portal login, then to the corporate portal home.
Step 3 · staffGoes to the staff login on the clinic network, then to the dashboard for their role.
Role stored on the accountRedirected to
patientPatient portal home
front_desk, admin_officerRegistration and queue dashboard
doctorDoctor dashboard
nurseNurse and ward dashboard
lab_techLaboratory dashboard
radiologist, imaging_techImaging dashboard
pharmacist, logisticsPharmacy and stock dashboard
financeFinance dashboard
corporate_officer (staff)Corporate accounts dashboard
corporate_client (company or agency HR officer)Corporate portal home
outreach team member (doctor or nurse on a trip)Outreach app, for the day of the trip
system_adminSystem dashboard

The prototype header now has one Login button that opens the three-way choice (view 03b), so a company or agency has a way in.

Design decision for the clinic. Staff dashboards live on the clinic server, not on the internet. The staff option on the landing page therefore opens the clinic's internal address, which works from inside the clinic network. This is intentional: it keeps clinical systems off the public internet. If staff need access from home later, a secure VPN can be added without changing the system.

6. Key workflows

Ordering a laboratory test with live stock control

  1. The laboratory maintains the test catalogue. Each test has a recipe listing the reagents it uses and the quantity per run.
  2. The laboratory records reagent stock by lot and expiry date.
  3. When the doctor opens the order panel, each test is checked against stock. If any reagent is short or expired, the test appears greyed out and cannot be selected, with the reason shown.
  4. When a test is ordered, its reagents are reserved. When the test is run, the reagents are deducted automatically.
  5. When a reagent falls below 10% of its normal full stock, the laboratory receives a warning. Below 5%, the alert becomes critical.
  6. The result is entered, verified, and released. It appears in the doctor's chart and, once released, in the patient portal.
Available

Selectable by the doctor.

Low, under 10%

Selectable. Warning sent to lab or pharmacy.

Critical, under 5%

Selectable. Urgent alert sent.

Out of stock

Greyed out and unclickable. Includes expired lots.

Allergy conflict

Flagged in the prescription panel. Needs a doctor decision.

Prescribing

The doctor selects drugs from the clinic formulary. Drugs with no stock are greyed out. The doctor can still choose "prescribe externally" for a drug the patient can buy elsewhere, which records the prescription without deducting stock. The pharmacy sees the prescription, dispenses it, and stock is deducted. For inpatients, the nurse sees the medication round and records each dose given.

The patient's recorded allergies appear in the chart header. When a drug conflicts with a recorded allergy, the prescription panel flags it. I recommend a warning that the doctor can override with a reason, which is logged, instead of a permanent block. Allergy records can be incomplete or mild, and the decision is clinical. Stock is different: an item that is out of stock or expired stays unselectable.

Inpatient stay

The front desk or doctor admits the patient and assigns a bed. Doctors add ward-round notes and orders. Nurses record vitals, nursing notes and medication given. All of it joins the same chart as the outpatient history. Discharge closes the admission and triggers the final invoice.

Billing

Charges come from what was actually ordered, performed and dispensed, so finance does not retype anything. Finance records payments and follows up unpaid balances. Released invoices appear in the patient portal. For corporate members the system checks the plan before an item is ordered and bills the company account within the plan limits, so the patient is not charged for covered care. Corporate invoices are produced per client from the same records.

7. Corporate clients and outreach

The clinic signs agreements with companies and agencies to provide health services to their employees under one or several plans. The system treats each employee and each dependent as an ordinary patient with one extra link to the plan that covers them. Everything else, from registration to billing, runs through the same patient record.

What the system holds

ConceptWhat it holds
ClientThe company or agency: contact persons, work locations in Dili and in the municipalities
AgreementStart and end dates, plans offered, monthly spending cap for the client, billing terms, outreach schedule
PlanA plan category (for example Standard Comprehensive or Basic Outreach Only) with covered services (consultation, laboratory, imaging, drugs, inpatient), annual ceiling per member and per dependent, co-payment, exclusions
Member and beneficiariesThe employee, linked to each dependent, with relationship, birth date, plan and effective dates
Coverage ledgerEvery covered service used, with date, amount billed to the client, patient co-payment, and remaining balance against the ceiling
Corporate invoiceMonthly statement per client, built from the coverage ledger

Coverage checks

When a corporate member is registered or opens a visit, the system shows the plan and the remaining balance. In the doctor's order and prescription panels, each item carries a coverage badge: covered, near the ceiling, ceiling reached, or not covered (patient pays). The doctor can still order what is clinically needed, and the front desk and finance see who pays.

How a company enrols its employees

1. SubmitThe company's HR officer fills in the online enrolment form on the corporate portal, or uploads a list in the clinic's template, with dependents attached to each employee.
2. ValidateThe system checks required fields, dates, duplicates and dependents without an employee, and shows errors row by row before submission.
3. ReviewThe clinic's corporate accounts officer reviews and approves, or returns the list with comments.
4. ActivateEach approved member gets a patient ID, a plan and an effective date. ID cards with a QR code can be printed.

The same portal lets the company add new employees, record departures and request changes to a member's plan. Each change is approved by the clinic and takes effect on a stated date.

Decision for the clinic: what companies may see. I recommend that HR officers see only enrolment, usage totals by month and service category, and invoices. They should never see diagnoses, notes or results, because an employer is not the patient's clinician. This is built into the design and should be written into each agreement.

Outreach services in the municipalities

Clinic teams regularly visit company sites outside Dili. The teams need the roster of members for that site and need to record what they do, even where mobile coverage is weak or absent.

1. Plan the tripThe corporate officer creates an outreach trip: client, municipality, date, team, services.
2. Prepare the rosterThe clinic sends the trip's roster to the online server, limited to what the team needs.
3. Field visitThe team opens the outreach app on a tablet or phone, finds members, checks coverage and records the encounter. This works offline.
4. SyncWhen there is signal, the app sends the visits. The clinic merges them into each patient's chart as outreach visits and updates billing.
  • The roster on the device holds identity, plan, coverage status, allergies and alerts. It does not carry the full chart.
  • The app only creates new records in the field. It never overwrites existing chart data, so syncing cannot damage a record.
  • A person not on the roster is registered as a walk-in marked "to verify", and the clinic confirms it later.
  • Devices keep an encrypted copy of one trip only, lock automatically, require a PIN, and clear the roster after a successful sync.

Decision for the clinic: devices and connectivity. I recommend clinic-owned tablets with a managed PIN policy rather than staff personal phones. An online-only version is simpler but would fail exactly where coverage is poor, so the offline-capable app is recommended.

8. Remote consultation

Patients and corporate members can ask for a consultation online. The first version is form-based: the patient completes a structured form and a doctor reviews it and replies. A scheduled phone or video call can be added later using the same forms and the same record.

1. RequestThe patient or member signs in to the portal, reads the emergency warning, and completes the consultation form.
2. TriageA nurse or front desk officer checks completeness and flags urgent cases. Red-flag answers tell the patient to attend in person or call the emergency number.
3. ReviewThe doctor opens the request in a Remote consultations queue, next to the patient's chart, and sees history, allergies and previous results.
4. ReplyThe doctor sends advice, a prescription, a lab or imaging order, a referral, or asks the patient to come in. The patient reads it in the portal.
FormTypical content
General consultationReason, symptoms, duration, self-reported temperature and vitals, medicines taken, allergies, photos or documents, consent
Follow-upProgress since the last visit, medicine use, new symptoms, questions
Chronic disease reviewHome readings (for example blood pressure or glucose), adherence, symptoms
Child healthAge and weight, symptoms, feeding, vaccination status
Corporate check-up questionnairePre-visit history and risk questions before an outreach or on-site check-up

A remote consultation is stored as a visit of type "Remote", with the doctor's note, orders and prescriptions, so it appears in the same timeline as every other visit. Coverage and billing work the same way as for visits in person.

Decision for the clinic: remote practice policy. The clinic should set the response time shown to patients, what may be prescribed without seeing the patient, and the consent wording on the form. The forms record the patient's consent and the identity check made at sign-in.

9. How it will be built

Application
Native PHP with HTML, CSS and JavaScript, no frameworks. One codebase organised in modules, one front controller, shared core for login, permissions, database access and audit.
Assets
The staff app runs on the clinic network, which may have no internet. Fonts and icons must be stored on the clinic server, not loaded from outside. In the prototype the icons are now embedded in the file. The fonts still load from the internet and must be stored locally.
Database
MySQL or MariaDB on the clinic server. Every table links to the patient and, where relevant, to the visit. Stock is kept as a ledger of movements, not a single editable number.
Clinic server
A small Linux server with Nginx and PHP-FPM, on a UPS. Staff use ordinary browsers over the clinic network.
Live updates
Dashboards request small JSON endpoints every 20 to 30 seconds to refresh alerts, queues and item availability.
Background jobs
Scheduled PHP scripts: portal sync every minute, stock alert checks, nightly backup, periodic restore test.
Online server
The existing hosted server runs the landing page, patient portal, corporate portal, outreach app and remote consultation forms, using a limited online database.
Source control
Git repository with numbered database migrations, so every update is applied the same way and can be rolled back.

Local server components

  • Staff web app with role dashboards: registration, outpatient, inpatient, laboratory, imaging, pharmacy and logistics, finance, system.
  • Patient hub database, including catalogues (tests, drugs, services), stock ledger, notifications and audit log.
  • Corporate module: clients, agreements, plans, members, coverage ledger, enrolment review, corporate invoicing, outreach trip planner.
  • Remote consultation queue inside the doctor dashboard.
  • Sync worker and outbox queue.
  • File storage for images, scans and reports, outside the public web folder.
  • Backup service to a second machine.

Online components

  • Landing page: promotional cards and call-to-action cards editable by the clinic, services, doctors, hours, location, login choice.
  • Patient portal: login with an activation code issued at registration; appointments and booking requests; released lab and imaging results; invoices; prescriptions; messages to the clinic.
  • Corporate portal: login for company and agency HR officers; online enrolment form; list upload with validation; member list; usage totals; invoices; outreach schedule.
  • Outreach app: an installable web app in plain JavaScript that stores one trip roster in encrypted local storage on the device, works offline, and syncs when the connection returns.
  • Remote consultation forms: structured forms in the patient portal, with uploads and consent.
  • Sync API: receives signed updates from the clinic and returns new bookings and messages.

How the two zones talk

When something becomes visible to patients (a result is released, an invoice is issued, an appointment slot opens) it is written to an outbox table on the clinic server. The sync worker sends pending items to the portal over HTTPS, signed with a shared secret, and retries until acknowledged. In the other direction, it fetches new appointment requests and messages. Only the fields each online user group needs are sent. The same mechanism carries outreach rosters out to the field app, and outreach visits, enrolment submissions and consultation requests back to the clinic.

10. Security and continuity

  • Role-based access: each role sees only the modules and actions it needs.
  • Audit log: every view and change of a patient record is recorded with user and time.
  • Passwords stored hashed; sessions protected; forms protected against forgery; all database access through prepared statements.
  • Encrypted connections on the clinic network and online.
  • The online zone holds only limited copies and cannot reach the clinic server.
  • Company users see enrolment, usage totals and invoices only, never clinical information.
  • Outreach devices keep an encrypted copy of one trip roster, lock automatically, and clear it after sync.
  • Remote consultations record consent and are covered by the same audit trail.
  • Nightly backups to a second machine, plus scheduled restore tests so backups are known to work.
  • Server on a UPS; the system keeps running during internet outages.

11. Roadmap and decisions

PhaseContentResult
0. DesignInteractive prototype built (section 12). Complete the remaining screens, review with each department, approve screens and workflowsApproved design
1. FoundationServer, database, login, roles, audit, system dashboardSecure base
2. Clinical coreRegistration, queue, outpatient visits, patient chart, encounter notesOPD can run on the system
3. Diagnostics and stockOrders, laboratory, imaging, pharmacy, stock ledger, alerts, availability controlOrder-to-result loop live
4. Inpatient and financeAdmissions, beds, ward rounds, nursing, billing, finance dashboardFull clinic operation
5. Corporate plansClients, agreements, plans, member enrolment with list upload, coverage checks, corporate billingCorporate care runs in the clinic
6. OnlineLanding page, patient portal, corporate portal, remote consultation forms, syncPatients and companies connected
7. OutreachOutreach app with offline roster, trip planning, syncField visits recorded in the chart
8. Pilot and go-liveStaff training, parallel run, corrections, launchProduction use

Decisions needed from DMC management

  • Confirm the list of services, tests, imaging studies and drugs to load into the catalogues.
  • Set the normal full stock level for each reagent and drug, which drives the 10% and 5% alerts.
  • Decide the languages of the landing page and portal.
  • Confirm billing rules: prices, insurers, discounts.
  • Name a lead in each department to review their dashboard during design and testing.
  • Decide whether imaging needs full medical-image (DICOM) support or image upload with a report is enough.
  • Define the plans: covered services, annual ceilings per member and per dependent, co-payments, exclusions.
  • Define the enrolment fields, the list template, and who approves enrolment and changes.
  • Confirm that companies see only enrolment, usage totals and invoices.
  • Choose the outreach devices and the policy for locking and clearing them.
  • Set the remote consultation policy: response time, what may be prescribed remotely, consent wording.
  • Decide the allergy-conflict rule: a warning with doctor override (recommended) or a hard block.
  • Confirm the opening hours to publish, including whether the clinic is open 24 hours, and the emergency number.

12. Interactive prototype

This is the working prototype of the Dili Medical Center (DMC) system, built as one HTML file and embedded below. Use the grey switcher bar at the top of the prototype to move between the public landing page, the login choice, the staff clinic system, the corporate portal, the outreach app and the patient portal. Click the hamburger button in the staff view to collapse the menu.

DMC prototypeSample data only. All names are fictional.

The same file is delivered separately as dmc-prototype.html and opens in any browser without internet, except for the Google fonts.

12.1 What the prototype covers

ViewContentStatus
Landing pageHeader with one Login button, hero, departments, call-to-action band, footer with DMC contactsBuilt
Login choiceThree cards: patient, company or agency, clinic staffBuilt
Staff systemCollapsible sidebar, doctor consultation with order panel, nurse and laboratory queues, imaging, pharmacy, finance with open invoicesBuilt
Corporate portalPlan summary, members, usage against the monthly capPartly built
Outreach appOffline roster and sync statusPartly built
Patient portalResults, appointments, invoicesPartly built

12.2 Adjustments made in this version

AreaChange
Staff menuThe sidebar collapses to icons, with a hamburger button. It collapses by itself on narrow screens.
Order panelThe doctor view had three cramped columns. The order panel is now a slide-over opened by the New order button.
Allergy conflictThe disabled Blocked button became Override, which asks for a reason that is logged. Only out-of-stock and expired items stay hard-blocked.
LoginThe header has one Login button, which opens the three-way choice. Companies and agencies now have a way in.
Public wordingInternal features (chart, reagent stock, offline sync) were replaced by what patients and companies get. The dead Specialists link was removed.
Landing pageAdded the departments grid, the corporate and outreach call-to-action band, and the footer with DMC contacts.
FinanceAdded an open-invoices table.
KeyboardMenu items and queue rows can be reached with Tab and activated with Enter or Space. Focus outlines added.
Self-containedIcons are embedded in the file, so it works offline.
Sample dataReal organisation and doctor names in the sample data were replaced by fictional ones.

12.3 Design system

The colours, type and components already used in the prototype are the design system. Keep them for the remaining screens.

Primary teal
#0F766E

12.4 Recommendations still open

  1. Filter the staff sidebar by role, so a nurse sees only nurse items. The prototype shows all items for review.
  2. Store the fonts on the clinic server, since the LAN may be offline. Icons are already embedded.
  3. Confirm the 24-hour emergency claim, the emergency phone number and the opening hours before the page goes public.
  4. Confirm the doctor names shown on the public page.

12.5 Screens still to design

  1. Front desk: patient registration, search and duplicate check, visit creation.
  2. Nurse: triage, vital signs, ward round notes, medication administration.
  3. Corporate accounts (staff side): agreements, plans, coverage ledger, corporate invoices.
  4. Corporate portal: enrolment form, bulk list upload with error report, dependants.
  5. Outreach: trip list, member card, new member form, walk-in marked to verify, sync result.
  6. Patient portal: booking, invoices, remote consultation form in steps with consent and red-flag screen.
  7. System administrator: users and roles, price lists, stock thresholds, sync log, audit log.
  8. Print views: invoice, prescription, lab report, imaging report, patient card.
  9. States: empty, loading, error, offline, out of stock, session expired.

12.6 From prototype to production

The prototype is a visual and behavioural reference only. Its data is static. In the build, each view becomes a PHP page that reads from the shared database, the HTML and CSS are reused as they are, and the small scripts for the sidebar and the order panel stay as vanilla JavaScript. Start with the staff shell and the doctor consultation, since every other module depends on the patient record and the stock ledger.

Section 12 is the source for the front end. Any change agreed in review should be made in the prototype first, then in the PHP templates.