DrFirst API Integration Guide: Rcopia and EPCS (2026)
CTO & Co-Founder
CTO & Co-Founder at Nirmitee.io. Architects healthcare integrations across FHIR, SMART on FHIR, ABDM and NHCX, writing from production experience taking hospital software from sandbox to go-live.

DrFirst makes Rcopia, an e-prescribing and medication management product that EHR and health IT vendors build into their own software. The DrFirst API is not public. DrFirst opens its technical documents, a sandbox and API test tools to partners after a contract is signed, through its Partner Integration Portal.
This guide is for a product lead or buyer who has to connect to DrFirst, and for the engineer who will build it. A common reason is to read prescriptions from DrFirst, or from the Surescripts network it runs on, instead of from the EHR. The guide covers the access steps, the message standard, EPCS, medication history, the limits DrFirst writes into its terms, and what DrFirst leaves unpublished. Last checked: Nov 18, 2026.
DrFirst API at a glance
| Question | Short answer |
|---|---|
| Who grants access? | DrFirst, through a partner contract and a dedicated account manager. |
| Who signs? | Your company signs an MSA, a product addendum and DrFirst's BAA. End users accept DrFirst's terms of use. |
| Are there public documents? | No. Documents, release notes and API test tools sit in the Partner Integration Portal. |
| Which routes exist? | Web integration of Rcopia, individual functions through APIs, SSO, and a FHIR API for electronic prior authorization. |
| Which message format? | NCPDP SCRIPT 20170715, an XML standard, for e-prescribing and medication history. |
| What does it cost? | Fee types are named (yearly license, one-time interface fee, EPCS fees). No amounts are published. |
| What is the biggest limit? | Medication history is for the treatment of a consenting patient only, and is not to be combined with software DrFirst did not provide. |
What can you build with the DrFirst API?
Eight use cases follow. Each points to a row in the table in section 6 (rows R1 to R9). DrFirst publishes no build times, so this guide gives no build estimate. Build complexity is our own rating.
1. Add e-prescribing to your EHR with Rcopia
- Who it is for: EHR and practice management vendors without their own certified e-prescribing module.
- The value: your users prescribe to pharmacies inside your product, and DrFirst carries the certification for e-prescribing.
- Build complexity: medium.
- How well it works: well. This is the core partner case. Rcopia 4 is certified for 170.315(b)(3) electronic prescribing, and DrFirst supports web integration or individual functions through APIs. See rows R1 and R2.
2. Prescribe controlled substances with EPCS and PDMP checks
- Who it is for: EHRs serving pain, behavioral health, urgent care and primary care practices.
- The value: prescribers send schedule II to V prescriptions electronically and see the state PDMP report without leaving the workflow.
- Build complexity: medium to high.
- How well it works: well, with set-up on the prescriber side. DrFirst EPCS reaches all pharmacies and 51 state and territory PDMPs. Each prescriber holds an OTP token and your company handles state and federal approvals. See row R3.
3. Show a patient's medication history at intake
- Who it is for: hospitals, emergency departments, urgent care and care management tools.
- The value: staff see 12 months of fills before reconciling the medication list.
- Build complexity: medium.
- How well it works: well for treatment. History combines Surescripts, pharmacy fills, payer records and HIEs, with patient consent before each request. See row R4.
4. Read prescriptions from DrFirst instead of from the EHR
- Who it is for: products that today read medications from an EHR API such as athena and want a pharmacy-side source.
- The value: one source for prescriptions and fills across practices.
- Build complexity: high.
- How well it works: limited. DrFirst publishes no read API for this. The terms limit medication history to treatment of the patient, and the MedHx terms bar combining it with software DrFirst did not provide. A single-patient EHI export exists for users. See rows R4 and R8.
5. Check drug price and coverage while prescribing
- Who it is for: EHRs that want fewer abandoned prescriptions.
- The value: the prescriber sees the patient's price from the PBM before sending.
- Build complexity: medium.
- How well it works: well. DrFirst states real-time benefit data reaches 98% of US patients. See row R5.
6. Run electronic prior authorization inside the EHR
- Who it is for: EHRs with specialty prescribers.
- The value: prior authorization starts and is tracked without a payer portal.
- Build complexity: medium.
- How well it works: well. DrFirst offers ePA inside Rcopia or as an API integration, including a FHIR API into your EHR. See row R6.
7. Keep prescribing when the EHR is down
- Who it is for: hospitals and health systems.
- The value: prescribers keep access to prescribing and medication history during downtime.
- Build complexity: low.
- How well it works: supported as a DrFirst product, set up with DrFirst. See row R7.
8. Move medication history into a new EHR
- Who it is for: health systems and vendors changing EHRs.
- The value: medications, allergies and immunizations land as coded data instead of free text.
- Build complexity: medium.
- How well it works: supported as a DrFirst service. See row R9.
The eight DrFirst use cases compared
| Use case | Who it is for | Complexity |
|---|---|---|
| Add e-prescribing with Rcopia | EHR and PM vendors | Medium |
| EPCS with PDMP checks | EHRs with controlled substance prescribers | Medium to high |
| Medication history at intake | Hospitals, urgent care, care management | Medium |
| Read prescriptions from DrFirst | Products moving off EHR medication APIs | High |
| Price and coverage while prescribing | EHRs | Medium |
| Electronic prior authorization | EHRs with specialty prescribers | Medium |
| Prescribing during EHR downtime | Hospitals and health systems | Low |
| Medication history for an EHR move | Health systems and vendors | Medium |
How do you get access to the DrFirst API?
You sign a partner contract with DrFirst first. Documents and the sandbox open after that.
DrFirst lists a seven step process for partners.
- Kick-off call. Once the contract is signed, your DrFirst account manager schedules a kick-off call. You meet your contacts and demo your application.
- Documents and staging. You get a sandbox, read the technical documents, and can ask the Integration Suggester tool for a plan.
- Pre-coding call. A DrFirst integration expert reviews your plan, best practices and certification requirements.
- Development. You build, open tickets for questions and track progress against the agreed timeline.
- Pre-certification. You run test scenarios, and DrFirst reviews them against clinical, operational and technical requirements.
- Certification. You walk DrFirst's certification team through the build and prepare beta users.
- Go-live. You go live with your first beta users, planned with the account manager.
On the contract side, your company signs an MSA, a product addendum and the BAA. It names an Application Administrator who grants and removes user access, and every end user accepts DrFirst's terms of use before first use. Your company also gives DrFirst "the proper data and server access" it needs to run the interface services.
If you are a digital health product that does not prescribe itself, the usual route is through an EHR that already runs Rcopia. DrFirst does not publish a separate program for read-only data users.
What does DrFirst API access give you?
Access opens in stages.
| Stage | What you get |
|---|---|
| Before contract | Public product pages and the ONC disclosure. No documents. |
| After contract | Partner Integration Portal: integration documents, release notes, training and launch materials, API test tools, Integration Suggester. |
| Staging | A sandbox environment for development. |
| Pre-certification and certification | Test scenarios reviewed by DrFirst, then a certification walkthrough. |
| Go-live | Production for your first beta users, then wider rollout. |
What are the ways to integrate with DrFirst?
DrFirst describes integration "from creative web integration to selecting individual functions or components, through APIs or groups of APIs".
| Route | What it is | When it fits |
|---|---|---|
| Embedded Rcopia web workflow | The Rcopia prescribing screens open inside your product | You want certified e-prescribing fast with little UI work |
| Function-level APIs | Individual Rcopia functions called from your own screens | You want your own UI around DrFirst services |
| SSO | Users reach Rcopia without a second login. Without SSO, MFA applies. | Any embedded set-up |
| FHIR API for ePA | Prior authorization into your EHR | You add ePA to an existing workflow |
| NCPDP SCRIPT over Surescripts | The standard messages DrFirst exchanges with pharmacies | Handled by DrFirst. Direct Surescripts access is a separate route, see our Surescripts integration guide. |
| EHI export | Single-patient export by a user, population export by support ticket | One-off data moves |
What can you read and write through DrFirst?
DrFirst publishes product functions, not endpoint names. The table lists each function and its source.
| Row | Function | Read or write | Source |
|---|---|---|---|
| R1 | New prescriptions to retail and mail pharmacies | Write | |
| R2 | Drug-drug and drug-allergy checks while ordering | Read | |
| R3 | Controlled substance prescriptions (schedule II to V) and PDMP reports | Write and read | |
| R4 | 12 months of medication history | Read | |
| R5 | Real-time price and benefit data from PBMs | Read | |
| R6 | Electronic prior authorization, including a FHIR API | Write and read | |
| R7 | Prescribing and medication history during EHR downtime | Write and read | |
| R8 | EHI export for one patient, or a population by ticket | Read | |
| R9 | Coded medication, allergy and immunization history for EHR moves | Read |
Which format does DrFirst use?
The message standard is NCPDP SCRIPT 20170715 for all e-prescribing and medication history messages. NCPDP SCRIPT is an XML standard, so a medication history response arrives as XML, not as FHIR JSON. Our NCPDP SCRIPT standard guide walks through the message types. DrFirst does not publish the format of its partner APIs on its public site. Ask for it at the pre-coding call.
What is not possible with the DrFirst API?
Know these gaps before you sign.
- No self-serve access. There is no public sign-up, key or sandbox. Everything starts with a contract.
- No public endpoint list. API documents sit behind the partner portal.
- No reuse of medication history. The terms allow it only for direct care of a consenting patient, never in aggregated form.
- No mixing MedHx with other software. The MedHx terms bar combining it with technology DrFirst did not provide.
- No listed FHIR patient API. The ONC disclosure lists no (g)(7) to (g)(10) API criteria for Rcopia 4.
- No live bulk feed. Population export goes through a support ticket.
To read prescriptions across practices, the usual workaround is each EHR's own API. Another is a direct Surescripts connection as a certified participant. Our post on the gap between NCPDP SCRIPT and FHIR MedicationRequest covers the mapping work either way. For Veradigm EHR, our Allscripts and Veradigm integration guide shows what its FHIR and Unity APIs expose for prescriptions.
What are the DrFirst API limits?
DrFirst publishes data and use limits in its terms. It publishes no rate limits.
| Limit | Value | Source |
|---|---|---|
| Medication history depth | 12 months | |
| Medication history use | Direct care of a consenting patient only | |
| Message standard | NCPDP SCRIPT 20170715 | |
| Login | MFA when SSO is not used | |
| App version | Users must run the latest version | |
| Rate limits, payload sizes | Not published |
How much does DrFirst integration cost?
DrFirst names the fee types but not the amounts. Its ONC disclosure says certified versions "may require additional costs pursuant to an annual contract commitment including: Yearly License fees, one-time interface fee (PMS), a one-time demographic upload fee, a one-time EPCS IDP fee, and a yearly EPCS license fee."
DrFirst publishes no price list, no per-transaction fee and no partner program fee. Ask for each fee in writing, and ask whether medication history and EPCS are priced per prescriber.
How long does a DrFirst integration take?
DrFirst publishes no time for the full partner process. The only published time is for medication history: "as little as two weeks, with access via web or EHR interface." Ask DrFirst for typical times for contract, development, pre-certification and certification, since each is a separate step.
How do you build a DrFirst integration, step by step?
The build follows DrFirst's seven steps. The work on your side looks like this.
Stage 1. Decide what you need
List the functions from section 6 your product needs. Decide if you embed Rcopia screens or call functions from your own UI.
Stage 2. Sign and get the sandbox
Sign the MSA, product addendum and BAA, then get portal and sandbox access.
Stage 3. Map your data
Map patients, prescribers and medications to what DrFirst expects. Medication history comes in NCPDP SCRIPT 20170715 XML. If your product stores FHIR, plan the mapping to MedicationRequest and MedicationDispense.
Stage 4. Build, pre-certify, certify
Build against the sandbox, run DrFirst's test scenarios, then walk the certification team through the build.
Stage 5. Go live with beta users
Start with a small group, then roll out. Keep users on the latest version.
Which DrFirst quirks should you know?
These come from DrFirst's own pages. Confirm each for your contract.
The format question has two answers
Messages to pharmacies use NCPDP SCRIPT 20170715. The partner API format is only in the portal documents.
A SCRIPT upgrade is coming
DrFirst says HTI-4 requires NCPDP SCRIPT 2023011 and new FHIR-based API standards.
Consent is per request
The MedHx terms require patient consent before requesting history for that patient.
History can be incomplete
DrFirst's terms say medication history "may not be complete or accurate" and ask you to confirm it with the patient.
The certified product is from 2017
Rcopia 4 was certified on Dec 27, 2017, and the disclosure was revised in June 2024.
Population export is rare
DrFirst's Real World Testing report received no population export tickets in the period.
EPCS tokens stay with one person
Each prescriber keeps sole possession of the OTP token and must report a lost token within one business day.
What should you check before you sign with DrFirst?
Check the BAA, the medication history terms and the EPCS duties.
Security and compliance, as DrFirst states them
- Rcopia 4 is certified for the ONC security criteria (d)(1) to (d)(8), (d)(12) and (d)(13).
- Your company signs DrFirst's BAA as part of the MSA.
- MFA applies to direct Rcopia login without SSO.
Rules for your side
Get patient consent before each medication history request and keep it on record. Use history only for treatment. Handle EPCS approvals for your prescribers. Keep a HIPAA-ready build for any data you store.
Testing
Use the sandbox, then DrFirst's pre-certification scenarios. Use test patients only.
Questions to ask DrFirst before you sign
- Which API format do partner functions use: XML, JSON or FHIR?
- Can a non-prescribing product read prescriptions or fills, and under which terms?
- What does each fee cost, and how is it counted?
- What are the rate limits and payload limits?
- What data does the sandbox hold?
- How long do pre-certification and certification take?
- When will Rcopia move to NCPDP SCRIPT 2023011?
- Is the FHIR API offered for anything beyond prior authorization?
- Which EHI export format does the single-patient export use?
- How is EPCS identity proofing done for each prescriber?
What is the next step for a DrFirst integration?
Planning a DrFirst integration, or deciding between DrFirst, Surescripts and the EHR's own API? We scope the route and the build with you. Start at our EHR integration service.
Ready to scale?
Talk to our healthcare engineering team about building, integrating, and shipping faster.
Frequently Asked Questions
Does DrFirst have a public API?
What format does the DrFirst API use?
What is Rcopia?
Does DrFirst have a sandbox?
Does DrFirst support EPCS?
How far back does DrFirst medication history go?
Can I read prescriptions from DrFirst for analytics?
How much does DrFirst cost?
Does DrFirst offer FHIR?
How long does DrFirst integration take?


