Secure patient messaging on Medplum: what the build involves
Medplum can represent a patient or care team message thread as FHIR Communication resources, but the security, routing and retention behavior around those resources is built by your team, not supplied by default. A clinic, health system or digital health team that wants patients and clinicians to exchange messages inside its own records usually reaches this need from one of three directions: replacing a patient portal messaging feature, adding secure chat for care teams, or handling replies to outreach campaigns such as recall notices and post-visit check-ins. Each starts with the same question: who may read a given message, and what happens to it afterward. This section sets out the build decisions behind that question. The sections that follow cover threads, routing, attachments and external channels in turn.
The first decisions are about identity and access. Every patient and staff participant needs a Medplum identity, and the access policy for Communication resources must limit each user to threads they are party to. Medplum's access control model supports this, but the policy has to be written, tested and reviewed for your own roles, including proxies, guardians and covering clinicians who may need temporary access. Confirm how your chosen identity provider and multi-factor settings apply to patient logins, since patients and staff usually need different sign-in paths. On a self-hosted deployment, your team also owns encryption in transit and at rest, audit logging of message reads and sends, and the retention schedule for message content, which Medplum does not set for you.
Routing and response tracking are the other large share of the work. A message from a patient has to reach a queue, an owner and a deadline, and an unanswered message has to escalate. Model these as Communication fields such as recipient, sender and status, and decide with clinical leadership which messages are urgent enough to need a different path to a phone call or an emergency instruction. Ask your compliance lead which regulations apply to your deployment, since the HIPAA Security Rule governs electronic protected health information and any business associate that handles it. Note that the Security Rule has no certification, so your evidence will be your own documented controls. Finally, confirm early whether attachments and external channels such as SMS or email notifications will carry protected content, because each one changes the risk and the contract scope.
Messaging design options and when each fits
This table compares the main messaging designs for a Medplum build: one-to-one patient threads, care team group threads, broadcast notices, and whether replies are modeled as linked Communication resources or as one growing thread. Read each row for the access, routing and audit consequences, then match the design to the workflow it must support. Most programs combine two or three of these patterns, so decide each one separately.
| Design option | Access and routing implications | Audit implications | When it fits |
|---|---|---|---|
| One-to-one patient thread | Access limited to one patient and the named clinicians assigned to them; routing goes to a single inbox or assigned owner | Each message traces to one sender and one patient record, which keeps the audit trail simple to review | Follow-up on results, medication questions and clinician replies to a specific patient |
| Care team group thread | Every participant needs a current membership; access changes as staff join, leave or change roles, so membership must be maintained | Membership changes become part of what an assessor may ask to see, so record who was added and removed and when | Multidisciplinary case discussion where several clinicians need the same context |
| Broadcast notice | Usually one-way to a defined patient population; recipients should not see each other or other patients' details | Record the content sent, the audience definition used and the time sent, because the audience is harder to reconstruct later | Clinic closures, vaccination reminders and program announcements that need no reply |
| Replies as linked Communication resources | Each reply carries its own access check and can be routed or escalated separately from the thread | Each message is an individually identifiable record, which makes it easier to trace who saw and answered what | Workflows that track response times, escalate unanswered messages or attach a message to a task |
| Single growing thread | Access is set once at the conversation level, which is simpler to administer but gives all participants the whole history | Fewer records to query, but audit entries must still capture who posted each message to show authorship | Low-volume patient conversations with a small, stable set of participants |
| Routing to a shared queue | Requires a defined owner per queue and a fallback when the owner is unavailable; confirm the access policy covers queue members | Record assignment, reassignment and read or response events to show who handled each message | Practices with several staff covering the same inbox during business hours and after hours |
How access control limits who reads each thread
A message thread holds protected health information, so who can read it is a design decision, not a default. The cards below cover the decisions that determine which patients, staff and tenants can see each Communication, and what to test before any thread reaches production.
Patient access versus workforce access
Patients and care team members reach the same thread through different identities, and each needs a different scope. A patient should see only threads where they are a participant, while a clinician sees threads for patients on their care team. Decide whether patient accounts are created at intake or invited later, and confirm how each sign-in path maps to a Patient or Practitioner resource. Test that a patient cannot read another patient's thread by changing an ID in a request.
Medplum auth docsAccess policies on Communication
Access policies decide which Communication resources each identity can read, create or update. Write the policy against participant and subject references on the Communication, not against a shared project role alone. Check that a policy restricts updates as well as reads, so a participant cannot edit or retract another person's message. Review how attachments referenced by a message inherit or fail to inherit the same restriction.
Project and tenant boundaries
Projects and tenants are the outer walls of your data. Messages for one clinic, practice or business unit should live in a project or tenant that other groups cannot query, even by accident. Decide early whether separate organizations share one Medplum project with policy separation or get their own. Confirm how bots, subscriptions and admin accounts cross these boundaries, since a broad service account can bypass a narrow policy.
Need-to-know within the care team
Membership in a care team does not automatically justify reading every thread for that patient. Limit access to clinicians actively involved in the episode, and define how a covering or consulting clinician gains access and how it ends. The CNIL's September 2026 fine against Hopital Prive de la Loire cited access control that ignored the care team's need to know, so document the rule and the code that enforces it.
Sign-in strength for external access
Patients and external clinicians reach messages from outside your network, so the sign-in method matters as much as the policy. Confirm which identity providers and multi-factor methods you will allow for each role, and whether workforce users sign in through corporate SSO. Check token lifetimes and how sessions end when a staff member leaves. The CNIL decision also turned on missing VPN and multi-factor authentication for external access.
Test policies with real role accounts
Before go-live, sign in with a test account for each role: patient, covering clinician, a clinician off the care team, front-desk staff and an administrator. For each account, attempt to read, create, edit and list threads belonging to other patients and other tenants. Record every unexpected result and retest after each policy change. Ask your own compliance and security reviewers to sign off on the test results.
How a patient message travels from portal to care team
A patient signs in to the portal through Medplum Auth or an external identity provider, and the app creates a Communication resource in the self-hosted Medplum server. Access policies decide who can read and write it before a Subscription or Bot routes it to a care team work queue. The clinician's reply follows the same checks in reverse. Audit logging and the self-hosted boundary wrap every step, so teams should confirm where logs are kept and who can read them.
Message flow from patient sign-in through routing to the clinician reply, inside the self-hosted boundary.
Setting up messaging on Medplum in order
This sequence takes a team from a deployment decision to a piloted patient and care team messaging service on Medplum, with a check at each step so that access, routing and attachments are proven before real patients use them. Each step produces an artifact the next step depends on.
Confirm the deployment model
Decide whether messaging runs on Medplum Cloud or a self-hosted deployment in infrastructure your organization controls, and record who operates the database, backups, logging and upgrades. Self-hosting shifts operational and compliance tasks to your team, and Medplum's compliance documentation describes that split as a shared responsibility. Confirm the hosting target (the self-hosting docs list several options, with some marked Beta) and the business associate agreement terms with Medplum or your hosting provider. Done when the deployment decision, the operations owner and the signed agreements are on file.
Define the resource model and categories
Map each messaging use case to FHIR Communication resources: patient to care team, care team internal, and automated notifications. Decide how threads are represented (for example, by linking messages through a shared identifier or a parent reference), which participants appear on each message, and which message categories and priorities your workflows need. Write the mapping down and review it with clinical and compliance staff before any build starts. Done when a sample thread for each category can be created and read back in a test project with the expected fields populated.
Configure patient and staff identity with MFA
Set up how patients and staff sign in. Patients and staff may use different identity providers, so decide which Medplum authentication method fits each group and whether staff sign-in requires multi-factor authentication. Confirm which features (such as multiple external identity providers) depend on your plan, and check the Medplum authentication documentation for the MFA options available to you. Test sign-in with a staff account and a patient account, including a failed MFA attempt. Done when both account types reach the messaging app, and the failed attempts are logged and blocked as designed.
Write access policies for threads
Write access policies so that a patient sees only threads where they are a participant, and staff see only the threads their role and care relationship permit. Account for need to know: a clinician outside the care team should not read a thread just because the record is reachable. Include policies for automated bots and client credentials, which should have the narrowest rights they need. Test each role against a set of allowed and denied reads, updates and searches, and record the results. Done when every test case returns the expected result and the test log is saved for review.
Build routing with Subscriptions or Bots
Route new messages to the right queue or person using Medplum Subscriptions or Bots, depending on whether the logic is a simple notification or needs custom decisions such as triage rules or after-hours handling. Define the routing rules in a table your clinical owners approve, including fallback routing when no one is assigned. Keep bot credentials and secrets out of code and confirm where bot logs are stored. Send test messages through each rule and confirm the right recipient receives each one. Done when every rule has at least one passing test and an unrouted message is escalated rather than dropped.
Test response tracking and the attachment path
Confirm that each message records its status and that unanswered messages surface in a work list with an owner. Test the time-based escalation your team designs, since response tracking needs a defined threshold and an accountable reviewer. Then test attachments end to end: upload, storage as a binary, linkage to the message, access checks when a different user opens it, and deletion. Check that the attachment is not exposed through a public URL. Done when a test attachment can be sent, opened by the authorized participant only, and removed according to your retention rule.
Plan external channels and confirm their boundaries
If messages will leave the platform through email, SMS or a patient portal link, document what content is sent in each channel and what stays inside Medplum. External notifications should carry no more detail than your policy allows, and any link should require authentication. Confirm each external provider's agreements and data handling with its vendor. Test one notification per channel with a non-patient test address. Done when each channel has a written content rule and a test record showing the notification contains only approved fields.
Run a security test before the pilot
Before any pilot patient is onboarded, test the messaging setup as an attacker and as a misconfigured user would. Cover authentication bypass, access policy gaps across threads and attachments, unauthorized bot or client credential use, injection through message content, and exposure of data in logs and notifications. Compare the results against the HIPAA Security Rule's technical safeguards, including unique user identification, automatic logoff and encryption, and confirm each finding is fixed and retested. Done when the report lists no open high-severity findings, retests are recorded, and the pilot go or no-go decision is signed by the compliance owner.
Routing messages and tracking response times
Routing decides who sees a message first, so design it before any messaging screen is built. On Medplum, each inbound message is a Communication resource, and the routing rule is the logic that sets its recipient or assigns it to a work queue. Teams commonly route by care team, by clinic location, by message category (medication refill, billing, symptom report) or by the patient's assigned clinician. Whichever you choose, record the routing result on the Communication itself, using fields such as recipient and sender plus a category code, so a reviewer can later see why a message landed where it did. Confirm with your clinical leads which categories need a clinician and which can go to a non-clinical queue, because that decision drives the access policies that determine who can open each queue.
Escalation and response tracking rely on automation that you run, not on Medplum by default. Subscriptions and Bots are the usual mechanism: a Subscription can notify a Bot when a Communication is created or updated, and the Bot can assign an owner, reassign an unanswered message or raise an overdue flag. Treat every timestamp as a design item. Capture when a message was received, when it was first viewed, when it was assigned, and when a clinician replied, and store those as data you can query for reporting rather than inferring them from logs. Set your own response-time thresholds with clinical governance, and confirm how your Medplum version and Subscription delivery behave under load, including retry and failure handling, before you rely on escalation for patient safety. For the queue mechanics, including shared work lists and handoffs, see the care coordination and task queues topic. Monitor the Bots and Subscriptions as production services with alerts for failed runs, since a silent failure means an overdue message never escalates.
Attachments and external channels: where the risk moves
Once messages leave the thread, risk moves to places the thread model does not cover: stored files, email and SMS alerts, and copies kept outside Medplum. The cards below cover each place a patient message can leak, and what your team should confirm before go-live.
Attachments stored as Binary resources
Files a patient or clinician sends are stored as FHIR Binary resources and referenced from the Communication through an attachment field, so access to the file is separate from access to the message text. Confirm that Binary access follows the same patient and care team rules as the thread, and test a direct request for a file ID by a user who is not a participant. Decide which file types you accept and whether images are stored as received.
Malware scanning to confirm
Medplum does not provide a malware scan as part of the messaging model in the material reviewed here, so treat scanning as a gap to confirm rather than a feature to assume. Ask whether uploads pass through a scanning service before a clinician can open them, who runs that service, and what happens to a file flagged as malicious. A scan should sit in the upload path, not after a user has already downloaded the file.
Notifications that carry only a sign-in prompt
Email and SMS alerts should tell the patient that a message is waiting and link to sign-in, with no message text, patient name or clinical detail in the body. Build the template so that a lost phone or a forwarded email reveals only that a message exists. Test the wording with your privacy office, and confirm that the link opens the sign-in flow rather than a direct message view.
Content in notification delivery
The notification service sends a message that is outside Medplum's access controls once it leaves your environment, so the sender address, subject line, preview text and any retry logs become part of your disclosure surface. Inspect what your provider stores and for how long, and whether message content or recipient numbers appear in delivery logs. Document each channel's data flow in your risk assessment.
Retention of copies outside Medplum
Copies of messages and attachments can persist in patient email inboxes, SMS carrier logs, mobile device backups and your own mail or log systems. Define a retention schedule for each external system and confirm that deleting a message in Medplum does not leave a copy in notification logs or exported reports. Ask your counsel which record retention rules apply to the copies you cannot control.
Audit trail for file access
A file opened from a notification or downloaded to a device is an access event that must be traceable to a user. Confirm which events Medplum records for Binary reads and Communication updates, and whether those records can be queried by patient and by user. Build a test that opens an attachment as a participant and as an outsider, then checks that both events appear in the log you will review.
Questions teams ask before building patient messaging on Medplum
What drives the build cost of patient messaging on Medplum?
The main cost driver is how many decisions the build has to make before any screen is written: who can join a thread, how care team members are routed, how responses are timed and tracked, and whether attachments and external channels are in scope. Each of these adds design, configuration and testing work. Costs split into one-time items (access policy design, routing logic, the patient and clinician interface, testing and documentation) and recurring items (hosting, upgrades, monitoring and security patching). Ask any quote to itemize these separately, and to state which external channels and identity providers are included.
How long does a messaging pilot usually take?
Duration depends mainly on scope. A pilot limited to one clinic, one message type and internal staff takes far less time than one with patient-facing threads, multiple care teams, attachments and an external notification channel. Other time drivers include how quickly your team confirms access rules, how many identity providers must be connected, and how long your compliance reviewers take to look at the evidence. No fixed duration applies to every organization, so ask for a timeline tied to a written scope with named milestones.
What does the work need from our clinical and compliance staff?
Clinical staff need to define who should receive which kinds of messages, what counts as urgent, what response times are reasonable, and which message content must be kept in the record. Compliance and privacy staff need to review access rules against the minimum necessary standard, confirm how security incidents are reported, and check that business associate agreements cover the vendors involved. Plan for these reviews early, because unresolved questions about who may see a thread are the most common reason a build stalls late in the schedule.
Can our internal team build patient messaging on Medplum alone?
A capable engineering team can build it alone if it has FHIR experience, access to Medplum's documentation, and time for the access control and testing work, which is usually the hardest part. Teams without prior FHIR or healthcare security experience often benefit from an outside review of the access policy design before patients use the system. DeployOpen can plan, implement, harden and document a self-hosted Medplum deployment inside your infrastructure under a fixed-scope written agreement, and can run security testing of the finished messaging flows. Decide which parts your team keeps before you start.
What changes when messaging runs self-hosted instead of on Medplum Cloud?
On Medplum Cloud, the platform operator handles hosting, patching and infrastructure. Self-hosting moves those tasks to you: you run the server, PostgreSQL and Redis, apply each minor version in sequence, and keep backups and monitoring working. Medplum's upgrading guide notes that skipping minor versions causes startup failures and that post-deploy data migrations can run for hours or days on large datasets, so upgrade windows must be planned. Medplum's policy targets security patches within 7 days for critical vulnerabilities and 14 days for high ones, and your team must be able to meet those timelines. Medplum's compliance documentation describes compliance as a shared responsibility, so your controls and evidence remain yours either way.
Does the HIPAA Security Rule require a certificate for our messaging system?
No. HHS states that no Security Rule standard requires an entity to certify compliance, and private certifications do not stop HHS from later finding a violation. For messaging, the relevant obligations are safeguards for electronic protected health information, including unique user identification, automatic logoff and encryption, along with business associate contracts that flow the same terms to subcontractors. Ask your compliance lead which evidence an auditor or customer will request, and treat any vendor certification as supporting material rather than proof of your own compliance.
Which parts of messaging should we test before go-live?
Test the access rules first, because a messaging thread is only as safe as its participant and policy design. Check that patients see only their own threads, that care team members see threads only when they have a need to know, that automatic logoff and multi-factor sign-in work for external users, and that message and attachment access is logged. Then test routing, escalation and response tracking under realistic volumes. DeployOpen runs application and API security testing that can cover these flows before go-live and retest after fixes.
Limits to confirm in your Medplum version and environment
Medplum's Communication handling, attachment limits, notification options, rate limits and Beta status can change between releases and differ between hosted and self-hosted deployments. Treat each item below as an open question until you have confirmed it in the docs for your target version and in a test environment built the way production will be.
Communication search and access behavior
Confirm how Communication search parameters behave in your target release, including which filters work, how results are paginated, and whether a search returns only the messages the caller's access policy allows. Run queries as each role in your design (patient, care team member, shared inbox, admin) and check that a participant cannot discover threads they were never added to. Record the exact search expressions your queues depend on, since a later upgrade can change them.
Versions and release policyAttachment size and storage limits
Confirm the maximum size of a single attachment, the total storage each project or tenant can use, and where binary content is stored for your deployment model. Check whether attachments are referenced from Communication payloads and whether they are returned through the same access checks as the message. Ask how large files are delivered to mobile and web clients, and what happens to attachments when a thread is archived or deleted.
Notification delivery options
Confirm which notification channels are supported out of the box (email, SMS, push or in-app), which require a Bot, Subscription or external messaging provider you run yourself, and what delivery guarantees each has. Confirm whether notifications carry message content or only a prompt to sign in, since that choice affects what leaves the system. Test failure handling, such as an unreachable provider or a bounced address, and confirm who is alerted.
Rate limits on message traffic
Confirm the request rate limits that apply to the API, to Subscriptions and to client authentication in your deployment, and whether they can be set per project or per client. Model peak use from your busiest clinic or care team, including burst sends after a shift change or an outbreak notice, and test that a limit does not silently drop messages. Check how throttled requests are reported to the client so that the app can retry safely.
Beta feature status
Confirm whether any Communication-related capability you plan to use is marked Beta or is limited to a specific deployment type in the release you will run. Beta features can change in ways that break a build, so record the status for each feature, the release it was checked against, and the owner who will recheck it before each upgrade. Keep a fallback design for any feature that is not generally available. Note that the Medplum docs are the authority for status, not this page.
Self-hosting docsHow DeployOpen scopes and delivers messaging builds
DeployOpen starts every messaging build with a written, fixed scope agreed before work begins. For Medplum messaging, that scope names the data model for threads, the Communication and CommunicationRequest patterns the team will use, the access policies that decide which patients, care team members and staff can read each thread, the routing and response tracking rules, the attachment and external channel decisions, the security testing to be run and the handover package. The quote follows from that document, so a client can compare it line by line against an internal estimate. Deliverables and timelines are set in the same written scope, and anything left open is listed as an assumption the client must confirm.
DeployOpen plans, implements, hardens and supports Medplum inside the client's own infrastructure, whether that is their AWS account, a Kubernetes cluster, or another environment the client controls. Hardening covers the messaging-specific settings: sign-in for patients and staff, multi-factor authentication, session lifetimes, audit logging of thread access and an access test for each role. Ongoing support, upgrades and continuous testing can be contracted as a retainer after handover. Confirm early which Medplum version the client will standardize on, because the upgrade path is sequential and affects what messaging features are available.
DeployOpen prepares systems, configuration, test results and records for compliance reviews, including the evidence a security or privacy team asks for when reviewing patient communication. It does not issue audit reports, attestations or certifications. Those come from independent auditors or certification bodies, and the client's compliance team should confirm early which framework applies to its messaging use. Medplum's compliance documentation describes compliance as a shared responsibility between Medplum and its customers, so the scope should state which controls are the client's and which are configured by DeployOpen.

