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.
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
| User | Where they log in | Dashboard they land on |
|---|---|---|
| Patient | Patient portal (online) | Patient portal home |
| Front desk officer / admin | Staff login (clinic network) | Registration and queue dashboard |
| Doctor | Staff login | Doctor dashboard |
| Nurse | Staff login | Nurse and ward dashboard |
| Laboratory technician | Staff login | Laboratory dashboard |
| Radiologist / imaging technician | Staff login | Imaging dashboard |
| Pharmacist / logistics officer | Staff login | Pharmacy and stock dashboard |
| Finance officer | Staff login | Finance dashboard |
| Corporate accounts officer | Staff login | Corporate accounts dashboard |
| Company or agency HR officer | Corporate portal (online) | Corporate portal home |
| Doctor or nurse on an outreach trip | Outreach app (online or offline) | Outreach trip and member roster |
| System administrator | Staff login | System 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.
What each spoke records
| Module | Writes to the patient record | Reads from the patient record |
|---|---|---|
| Registration | Identity, contact, next of kin, insurer, appointments, queue number | Visit history, unpaid balances |
| Outpatient | Visits, encounter notes, diagnoses, orders, prescriptions | Chart, results, past notes |
| Inpatient | Admissions, bed, doctor ward-round notes, nurse notes, vitals, medication given | Chart, orders, results, prescriptions |
| Laboratory | Sample status, results, reagent use | Test orders, patient details |
| Imaging | Study status, images, radiology report | Imaging orders, clinical question |
| Pharmacy and logistics | Dispensed items, stock movements | Prescriptions |
| Finance | Invoices, payments, claims | Services and items used, from orders and dispensing |
| Remote consultation | Consultation requests, doctor advice, remote-visit note, prescriptions | Chart, previous results, allergies |
| Corporate and outreach | Client agreements, plans, members and dependents, coverage use, outreach visits | Eligibility, plan limits, trip roster |
| Patient portal | Appointment requests, messages | Released 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.
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.
| Section | Content | Prototype |
|---|---|---|
| Header | Logo and name (Dili Medical Center, Centro Médico de Díli), menu: Services, Corporate Plans, Municipal Outreach, Contact, and one Login button | Built |
| Hero | Headline, two buttons (Book an appointment, View test results), a consultation card with the emergency line and opening status | Built |
| Promotional cards | Four cards: Complete Wellness Package (featured), Malaria and Dengue Screening, Annual Company Screening, Pediatric and Maternal Care. Editable by the clinic | Built |
| Departments grid | Outpatient, inpatient, laboratory and imaging, pharmacy, remote consultation, municipal outreach | Built |
| Specialists | Photo, name, specialty, days available | To design |
| Corporate services | What the plans cover, how a company enrols its staff in three steps, a button to contact the clinic | To design |
| Call-to-action cards | Book an appointment, Remote consultation, Corporate plans, View my results | Built |
| Footer | DMC name, address, opening hours, contacts. Map and language selector still to add | Partly 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
| Role stored on the account | Redirected to |
|---|---|
| patient | Patient portal home |
| front_desk, admin_officer | Registration and queue dashboard |
| doctor | Doctor dashboard |
| nurse | Nurse and ward dashboard |
| lab_tech | Laboratory dashboard |
| radiologist, imaging_tech | Imaging dashboard |
| pharmacist, logistics | Pharmacy and stock dashboard |
| finance | Finance 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_admin | System 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
- The laboratory maintains the test catalogue. Each test has a recipe listing the reagents it uses and the quantity per run.
- The laboratory records reagent stock by lot and expiry date.
- 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.
- When a test is ordered, its reagents are reserved. When the test is run, the reagents are deducted automatically.
- When a reagent falls below 10% of its normal full stock, the laboratory receives a warning. Below 5%, the alert becomes critical.
- The result is entered, verified, and released. It appears in the doctor's chart and, once released, in the patient portal.
Selectable by the doctor.
Selectable. Warning sent to lab or pharmacy.
Selectable. Urgent alert sent.
Greyed out and unclickable. Includes expired lots.
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
| Concept | What it holds |
|---|---|
| Client | The company or agency: contact persons, work locations in Dili and in the municipalities |
| Agreement | Start and end dates, plans offered, monthly spending cap for the client, billing terms, outreach schedule |
| Plan | A 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 beneficiaries | The employee, linked to each dependent, with relationship, birth date, plan and effective dates |
| Coverage ledger | Every covered service used, with date, amount billed to the client, patient co-payment, and remaining balance against the ceiling |
| Corporate invoice | Monthly 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
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.
- 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.
| Form | Typical content |
|---|---|
| General consultation | Reason, symptoms, duration, self-reported temperature and vitals, medicines taken, allergies, photos or documents, consent |
| Follow-up | Progress since the last visit, medicine use, new symptoms, questions |
| Chronic disease review | Home readings (for example blood pressure or glucose), adherence, symptoms |
| Child health | Age and weight, symptoms, feeding, vaccination status |
| Corporate check-up questionnaire | Pre-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
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
| Phase | Content | Result |
|---|---|---|
| 0. Design | Interactive prototype built (section 12). Complete the remaining screens, review with each department, approve screens and workflows | Approved design |
| 1. Foundation | Server, database, login, roles, audit, system dashboard | Secure base |
| 2. Clinical core | Registration, queue, outpatient visits, patient chart, encounter notes | OPD can run on the system |
| 3. Diagnostics and stock | Orders, laboratory, imaging, pharmacy, stock ledger, alerts, availability control | Order-to-result loop live |
| 4. Inpatient and finance | Admissions, beds, ward rounds, nursing, billing, finance dashboard | Full clinic operation |
| 5. Corporate plans | Clients, agreements, plans, member enrolment with list upload, coverage checks, corporate billing | Corporate care runs in the clinic |
| 6. Online | Landing page, patient portal, corporate portal, remote consultation forms, sync | Patients and companies connected |
| 7. Outreach | Outreach app with offline roster, trip planning, sync | Field visits recorded in the chart |
| 8. Pilot and go-live | Staff training, parallel run, corrections, launch | Production 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.
12.1 What the prototype covers
| View | Content | Status |
|---|---|---|
| Landing page | Header with one Login button, hero, departments, call-to-action band, footer with DMC contacts | Built |
| Login choice | Three cards: patient, company or agency, clinic staff | Built |
| Staff system | Collapsible sidebar, doctor consultation with order panel, nurse and laboratory queues, imaging, pharmacy, finance with open invoices | Built |
| Corporate portal | Plan summary, members, usage against the monthly cap | Partly built |
| Outreach app | Offline roster and sync status | Partly built |
| Patient portal | Results, appointments, invoices | Partly built |
12.2 Adjustments made in this version
| Area | Change |
|---|---|
| Staff menu | The sidebar collapses to icons, with a hamburger button. It collapses by itself on narrow screens. |
| Order panel | The doctor view had three cramped columns. The order panel is now a slide-over opened by the New order button. |
| Allergy conflict | The disabled Blocked button became Override, which asks for a reason that is logged. Only out-of-stock and expired items stay hard-blocked. |
| Login | The header has one Login button, which opens the three-way choice. Companies and agencies now have a way in. |
| Public wording | Internal features (chart, reagent stock, offline sync) were replaced by what patients and companies get. The dead Specialists link was removed. |
| Landing page | Added the departments grid, the corporate and outreach call-to-action band, and the footer with DMC contacts. |
| Finance | Added an open-invoices table. |
| Keyboard | Menu items and queue rows can be reached with Tab and activated with Enter or Space. Focus outlines added. |
| Self-contained | Icons are embedded in the file, so it works offline. |
| Sample data | Real 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.
#0F766E
12.4 Recommendations still open
- Filter the staff sidebar by role, so a nurse sees only nurse items. The prototype shows all items for review.
- Store the fonts on the clinic server, since the LAN may be offline. Icons are already embedded.
- Confirm the 24-hour emergency claim, the emergency phone number and the opening hours before the page goes public.
- Confirm the doctor names shown on the public page.
12.5 Screens still to design
- Front desk: patient registration, search and duplicate check, visit creation.
- Nurse: triage, vital signs, ward round notes, medication administration.
- Corporate accounts (staff side): agreements, plans, coverage ledger, corporate invoices.
- Corporate portal: enrolment form, bulk list upload with error report, dependants.
- Outreach: trip list, member card, new member form, walk-in marked to verify, sync result.
- Patient portal: booking, invoices, remote consultation form in steps with consent and red-flag screen.
- System administrator: users and roles, price lists, stock thresholds, sync log, audit log.
- Print views: invoice, prescription, lab report, imaging report, patient card.
- 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.