Version: 1.0
Last Updated:14 January 2026

1. Introduction

The SMRP Automator is a Chrome Extension designed to streamline data entry for Dietetic modules within the Ministry of Health's SMRP Portal (MyHDW). It integrates directly with Google Sheets to eliminate manual double-entry, automates patient registration, and ensures data accuracy.

Key Features:
  • Three-Way Integration: Supports Inpatient (P.DALAM), Outpatient (P.LUAR), and Group Therapy (MNT BERKUMPULAN).
  • Smart Navigation: Automatically locates the correct patient visit row based on service type and date.
  • Deep Observer: Intelligently waits (up to 32 seconds) for slow-loading forms to prevent errors.
  • Registration Automation: Auto-generates sequential Registration Numbers (e.g., DT10001).

2. Installation Guide

  1. Download & Extract: Save the provided extension files (manifest.json, content.js, etc.) into a folder named SMRP_Automator.
  2. Load into Chrome:
    • Open chrome://extensions/.
    • Toggle Developer mode (top right).
    • Click Load unpacked and select your folder.
  3. Pin the Extension: Click the Puzzle Piece icon in the toolbar and pin SMRP Automator.
Installation Screenshot

3. View Modes

You can customize how the extension appears on your screen.

Option A: Sidebar Mode (Recommended)

Best for continuous data entry. The panel stays open while you navigate.

  1. Right-click the SMRP Automator icon.
  2. Check "Open in Side Panel".
  3. Click the icon to open the persistent side panel.
Side bar mode

Option B: Popup Mode

Best for quick, single-use actions.

  1. Right-click the extension icon.
  2. Uncheck "Open in Side Panel".
  3. Click the icon to open as a floating window.
Popup mode Popup mode

4. Google Sheet Configuration

The automation reads columns based on the Sheet Name. Ensure your headers match these layouts.

Sheet Name

A. Inpatient Layout (Sheet: P.DALAM)

ColData PointPurpose
CAdmission DateMatches the specific visit date in the portal.
GAgeDetermines Patient Type (Dewasa/Kanak-Kanak).
HDiagnosisFills "Main Diagnosis" field.
JDiet TypeSelects the main Diet Type dropdown.
KSpecific DietChecks checkboxes (e.g., Diabetic, Low Salt).
LDisciplineSelects the Discipline dropdown.
MNutrition SupportSelects Oral, ONS, or Tube.
OVisit TypeChecks if the visit is a "Follow Up Case".

B. Outpatient Layout (Sheet: P.LUAR)

ColData PointPurpose
BDateSets Registration and Visit Date.
EIC No.Calculates Age to set Patient Type.
FDiagnosisFills "Main Diagnosis" field.
GDiet TypeSelects Diet Type dropdown.
HSpecific DietChecks specific diet checkboxes.
IReferral (Int)Sets Source to "Internal".
KReferral (Ext)If checked, sets Visit Type to "New Case".
NDisciplineSelects Discipline dropdown.

C. Group Therapy Layout (Sheet: MNT BERKUMPULAN)

ColData PointPurpose
BDateSets Visit Date.
DIC No.Calculates Age/Patient Type.
EReferral SourceSets Internal vs External.
FDiet TypeSelects Diet Type dropdown.
HDisciplineSelects Discipline dropdown.

5. Initial Setup

  1. Open Settings: Click the Gear Icon inside the extension.
  2. Setting Icon
  3. Link Spreadsheet: Paste your Spreadsheet ID from your Google Sheet URL (the string between /d/ and /edit) and select the Sheet Name.
  4. Spreadsheet ID
  5. RN Configuration:
    • RN Prefix: Default is DT10.
    • Next RN Seq: e.g., 001 (The counter that increments after each registration).
    • Result: DT10001.
  6. Authorize: Click Test Connection and sign in with Google.
Important: When signing in into this extension, you MUST use your Workspace Email (@moh.gov.my). Ensure this specific account has been granted "Editor" or "Viewer" access to the Google Sheet you are trying to link.
Initial Setup

6. Workflows

Workflow A: Outpatient Registration

Use for new P.LUAR cases needing an RN.

  1. Search Patient in SMRP > Visit Page.
  2. Set Extension to P.LUAR and Row Number to the patient's row in Google Sheet (e.g., 14)..
  3. Check Next RN Seq.
  4. Click Start Outpatient Reg.
  5. Extension Action: Tool clicks "Add Clinical Support", fills Date (08:00 AM), fills RN, and Submits.
Screen 1 Screen 2 Screen 3

Workflow B: Clinical Data Entry

Scenario 1: Outpatient (Individual)

  1. Ensure you are on the Visit page.
  2. Set Extension to P.LUAR and Row Number to the patient's row in Google Sheet (e.g., 14)..
  3. Click Fetch & Fill Clinical Data.
  4. Extension Action: Scans for "Sokongan Klinikal" & "SSDT" in RN, Finds the visit row matching your Sheet Date, and fills the clinical form.
Outpatient

Scenario 2: Inpatient (Ward)

  1. Ensure you are on the Visit page.
  2. Set Extension to P.DALAM and Row Number to the patient's row in Google Sheet (e.g., 14)..
  3. Click Fetch & Fill Clinical Data.
  4. Extension Action: Scans for "Pesakit Dalam" rows earlier than your admission date and fills the clinical form.
Inpatient

Scenario 3: Group Therapy

  1. Ensure you are on the Visit page.
  2. Set Extension to MNT BERKUMPULAN and Row Number to the patient's row in Google Sheet (e.g., 14)..
  3. Click Fetch & Fill Clinical Data.
  4. Extension Action: Scans for "Sokongan Klinikal" & "SSDT" in RN, Finds the visit row matching your Sheet Date, auto-sets "Consultation Type" to Group Class and "Visit Type" to New Case and fills the clinical form.

7. Troubleshooting Guide

Navigation Errors

Error / Symptom Solution
Popup: " No matching earlier visit found..." 1. Check Dates: Ensure Sheet date matches Portal.
2. Expand View: Scroll down in SMRP and change items per page to All or 20.
Automation stops (Silent) The form loaded too slowly (>32s). Click the extension button again to retry.
Wrong Row Selected Refresh the page to clear old menus. The tool needs a clean layout.
Expand View

Data & Connection Errors

Error / Symptom Solution
"Auth Failed" 1. Close Google Chrome completely and restart it.
2. Click Test Connection again to refresh the security token.
"Registration Number already exists" Change Next RN Seq in settings to a higher number (e.g., 50).
"Missing Data: IC No." Fill column E in your Google Sheet.