Dashboard
Dr. Admin · Surgeon
DA
0
Evals
0
Waitlist
0
Surgeries
0
MDT
0
Post-Tx
Active Evaluations
0
Pending workup/decision
Eval — No Transplant
0
Completed, not transplanted
DDLT Waitlist
0
Active listed patients
Total Surgeries
0
In logbook
Post-Transplant
0
In registry (follow-up)
Today's OPD
0
Patients booked
MDT Decisions
0
Total recorded
LDLT Pairs
0
Linked donor-recipient
🔴 High-Priority Waitlist (MELD > 25)
No urgent patients
📅 Today's Schedule
No events today
⏸ Evaluated — Awaiting / Not Transplanted
None
🕒 Recent Logbook Entries
No surgeries logged
Patient Evaluations
All
LDLT Donor
LDLT Recipient
DDLT
Approved
Completed — No Transplant
IDPatient NameAge/SexType IndicationMELD/CTPPaired WithStatusDateActions
No evaluations yet.
DDLT Waiting List
Blood Group O
0
MELD > 25
0
Active
0
Avg Wait (days)
Reg #PatientAge/SexBlood Group MELDCTPIndicationListed Date Days WaitingStatusNotesActions
No patients on waitlist.
MDT Meeting Records
DatePatientCase TypeDecisionAttendeesNext StepsActions
No MDT records yet.
Surgical Logbook
LDLT
0
DDLT
0
Donor Hepatectomy
0
Other HPB
0
Lead Surgeon
0
Assistant
0
All
LDLT
DDLT
Donor
Other HPB
#DatePatient/IDProcedureRole Blood LossDurationOutcomeNotesActions
No surgeries logged.
OPD Clinic
Total Clinic Sessions
0
Total Patients Seen
0
This Month
0
Patients seen
Avg per Session
0
DateSurgeonLocationPatients SeenNotesActions
No clinic sessions logged yet. Click "+ Log Clinic Session" to add.
Patient Records
MRNNameAge/SexBlood Group DiagnosisStatusTransplant DateContactNotesActions
No patients registered.
Calendar & Surgeon Availability
📅
Google Calendar Integration
Connect to sync appointments, OT schedule, and OPD sessions with your team.
View:
Surgeon:
April 2025
Sun
Mon
Tue
Wed
Thu
Fri
Sat
👥 Surgeon Availability This Month
📅 OPD Sessions (from Clinic Log)
DateSurgeonLocationPatients
No OPD sessions logged.
🚫 Leave & Unavailability
SurgeonFromToReasonActions
No leave marked.
📋 All Events
DateTimeTitleTypeSurgeonPatientActions
No events scheduled.
Secure Messaging
Select a conversation
Files & Google Drive
📁
Google Drive Storage
Files are uploaded to Google Drive → TransplantOS/PatientName_UHID/Label_filename. Click Load from Drive to sync previously uploaded files.
📤 Upload Files
📤
Click or drag files here to upload
Images, PDFs, DICOM reports — tagged with patient + label and stored in Drive
🔍 Search & Retrieve Files
FilenameLabelPatient / UHIDTypeSizeUploadedNotesActions
No files uploaded yet.
📊 Google Sheets Sync
Each save auto-syncs to Sheets. Use "Sync All" to push everything at once, or "Load from Sheets" to pull data another team member entered.
Connect in Settings → Deploy to enable live sync.
Users & Access Control
🔐 Role Permissions Matrix
FeatureAdminSurgeonCoordinatorFellow
View All Patients
Add/Edit Patients
Surgical LogbookOwn only
OPD Clinic RecordsView onlyOwn only
MDT RecordsView only
Waitlist ManagementView only
User Management
Export PDF/Sheets
NameEmailRoleLast Active2FAActions
Profiles
👤 My Profile
DA
Click to change
🏥 Hospital / Unit Profile
👩‍⚕️ Surgeon Team
No surgeon profiles added yet.
Settings
🏥 Hospital & Department
🔗 Integrations
📊
Google Sheets Backend
ID: Not configured
📁
Google Drive
Folder: Not linked
📅
Google Calendar
Sync appointments and OT schedule
🛡️ Security
🚀 Deploy with Google Apps Script (Option 3)

This option connects TransplantOS directly to Google Sheets as a live database — any team member who opens the app URL sees the same data in real time. No server needed.

Step 1 — Create your Google Sheet
Go to sheets.google.com → New spreadsheet → Name it TransplantOS_DB.
Create these tabs (sheets): Patients Evaluations Waitlist Logbook MDT OPD Events
Copy the Spreadsheet ID from the URL: docs.google.com/spreadsheets/d/[THIS PART]/edit
Step 2 — Create the Apps Script web app
In the Sheet → Extensions → Apps Script → delete default code → paste this:
const SHEET_ID = 'YOUR_SPREADSHEET_ID_HERE';

// Headers for each tab
const HEADERS = {
  Patients:    ['id','name','mrn','age','sex','dob','bg','phone','address','diag','txDate','txType','status','history','plan'],
  Evaluations: ['id','name','mrn','age','sex','bg','type','indication','meld','ctp','status','date','notes','pairedId','pairRelation','txDate'],
  Waitlist:    ['id','reg','name','age','sex','bg','meld','ctp','indication','date','status','notes'],
  Logbook:     ['id','date','patient','agesex','bg','procedure','category','role','leadName','blood','duration','graft','grwr','cit','wit','outcome','thirtyDay','notes'],
  MDT:         ['id','date','patient','type','decision','attendees','summary','steps'],
  OPD:         ['id','date','count','surgeon','location','notes'],
  Events:      ['id','date','time','title','type','surgeon','patient','notes'],
  Leaves:      ['id','surgeon','from','to','reason','notes']
};

function doGet(e) {
  try {
    const tab = e.parameter.tab || 'Patients';
    const ss = SpreadsheetApp.openById(SHEET_ID);
    let sheet = ss.getSheetByName(tab);
    if (!sheet) {
      sheet = ss.insertSheet(tab);
      if (HEADERS[tab]) sheet.appendRow(HEADERS[tab]);
    }
    const data = sheet.getDataRange().getValues();
    return ContentService
      .createTextOutput(JSON.stringify({ ok: true, data }))
      .setMimeType(ContentService.MimeType.JSON);
  } catch(err) {
    return ContentService
      .createTextOutput(JSON.stringify({ ok: false, error: err.message }))
      .setMimeType(ContentService.MimeType.JSON);
  }
}

function doPost(e) {
  try {
    const payload = JSON.parse(e.postData.contents);
    const ss = SpreadsheetApp.openById(SHEET_ID);
    const tab = payload.tab;
    let sheet = ss.getSheetByName(tab);
    if (!sheet) {
      sheet = ss.insertSheet(tab);
      if (HEADERS[tab]) sheet.appendRow(HEADERS[tab]);
    }

    if (payload.action === 'sync') {
      // Full replace: clear data rows, write all rows
      const lastRow = sheet.getLastRow();
      if (lastRow > 1) sheet.deleteRows(2, lastRow - 1);
      if (payload.rows && payload.rows.length > 0) {
        sheet.getRange(2, 1, payload.rows.length, payload.rows[0].length)
             .setValues(payload.rows);
      }
    } else if (payload.action === 'upsert') {
      // Insert or update a single row by id (column 1)
      const id = String(payload.row[0]);
      const data = sheet.getDataRange().getValues();
      let found = false;
      for (let i = 1; i < data.length; i++) {
        if (String(data[i][0]) === id) {
          sheet.getRange(i + 1, 1, 1, payload.row.length).setValues([payload.row]);
          found = true; break;
        }
      }
      if (!found) sheet.appendRow(payload.row);
    } else if (payload.action === 'delete') {
      const id = String(payload.id);
      const data = sheet.getDataRange().getValues();
      for (let i = data.length - 1; i >= 1; i--) {
        if (String(data[i][0]) === id) { sheet.deleteRow(i + 1); break; }
      }
    }

    return ContentService
      .createTextOutput(JSON.stringify({ ok: true }))
      .setMimeType(ContentService.MimeType.JSON);
  } catch(err) {
    return ContentService
      .createTextOutput(JSON.stringify({ ok: false, error: err.message }))
      .setMimeType(ContentService.MimeType.JSON);
  }
}
Step 3 — Deploy as web app
In Apps Script → Deploy → New deployment
Type: Web app
Execute as: Me
Who has access: Anyone within [your organisation] (or "Anyone" for external)
→ Click Deploy → Copy the Web App URL
Paste it in the field below and click Save.
Step 4 — Connect the app
Not connected
Step 5 — Share with your team
Save this HTML file anywhere accessible to your team (email it, host on Google Sites, hospital intranet, or use Netlify free tier for HTTPS). Each team member opens the file and uses the same Google Sheets database. Share the Sheet with team member emails for direct spreadsheet access.

Security note: For patient data, restrict Apps Script access to "Anyone within [your Google Workspace domain]" and enable 2-step verification on all accounts. Comply with DISHA 2023 / IT Act requirements for health data storage in India.