⚡ Developer Portal

Build on MyRx-Access

Integrate patient-sovereign health identity into your application. FHIR R4 APIs, SMART on FHIR OAuth, and a published npm SDK — everything you need to get to production in minutes.

FHIR R4 SMART on FHIR @myrx-token/mrx-access Hyperledger HIPAA Compliant Sandbox Instant

Platform Status

EHR API
LIVE
FHIR R4
LIVE
SMART OAuth
LIVE
Sandbox
LIVE
SDK Version
0.1.0

What You Can Build

🏥
EHR Integrations
Pull patient records via FHIR R4 with patient consent. 15+ US Core resource types: Patient, Observation, MedicationRequest, Condition, and more.
🔑
Identity Verification
Verify patient identity using MyRx-ID NFT tokens. Cryptographic proof of identity without exposing PHI. Perfect for telehealth and prescription workflows.
💊
Prescription & Drug Safety
DSCSA drug provenance verification, FDA recall alerts, NLM drug interaction checks. Build patient safety features with real FDA data.
💰
Health Finance
MRT token rewards, gas fee transparency, and the MyRx-Rail payment layer. Build cashback apps, HSA integrations, or DeFi health finance tools.
📱
Patient Engagement
Consent flows, push notifications, QR-based sharing, and NFC proximity tap. Patient experience tools that eliminate friction.
🔗
Blockchain Anchoring
Anchor consent events and health data to Hyperledger Fabric via MyRx-Chain. Immutable audit trails for compliance and legal use cases.

Access Levels

LevelDescriptionKey TypeApproval
Sandbox Synthetic FHIR data, all endpoints, no PHI. Instant approval. mrx_sb_… Automatic
Basic Read-only FHIR R4 access. Production patient data with consent. mrx_lv_… Manual Review
FHIR Read + write FHIR R4. Full consent lifecycle, NFT identity, AI agents. mrx_lv_… Manual Review
Full All APIs including admin, MyRx-Chain, Rail, Nexus. Enterprise partners only. mrx_lv_… Partner Agreement

Quickstart

From zero to your first FHIR patient record in under 5 minutes.

1
Get your API key
Go to the tab and register your app. A sandbox key is issued immediately — no approval required.
2
Install the SDK
Install @myrx-token/mrx-access from npm.
bash
npm install @myrx-token/mrx-access
3
Get a sandbox bearer token
Exchange your API key for a short-lived bearer token (4 hours). Works in sandbox without patient consent flows.
javascript
import { MRxAccess } from '@myrx-token/mrx-access';

const client = new MRxAccess({
  apiKey: 'mrx_sb_YOUR_SANDBOX_KEY',
  environment: 'sandbox',
  baseUrl: 'https://ehr.myrxwallet.io',
});

// Exchange API key for bearer token
const { access_token } = await client.getSandboxToken();
console.log('Token:', access_token);
4
Fetch a patient record (FHIR R4)
Query the FHIR R4 Patient endpoint using your bearer token.
javascript
// With the SDK
const patient = await client.fhir.getPatient('patient-id-here');
console.log(patient.name, patient.birthDate);

// Or direct REST with your token
const res = await fetch(
  'https://ehr.myrxwallet.io/api/v1/fhir/r4/Patient/patient-id',
  { headers: { 'Authorization': `Bearer ${access_token}` } }
);
const data = await res.json();
5
Search medications
Use FHIR search to find active medications for a patient.
javascript
const meds = await client.fhir.search('MedicationRequest', {
  patient: 'patient-id',
  status: 'active',
});
meds.entry?.forEach((e) => {
  console.log(e.resource.medicationCodeableConcept?.text);
});

cURL Examples

bash — Get sandbox token
curl -X GET https://ehr.myrxwallet.io/api/v1/developer/sandbox/token \
  -H "X-Api-Key: mrx_sb_YOUR_KEY"
bash — FHIR Patient search
curl https://ehr.myrxwallet.io/api/v1/fhir/r4/Patient?name=Smith \
  -H "Authorization: Bearer YOUR_TOKEN"
bash — SMART discovery
curl https://ehr.myrxwallet.io/.well-known/smart-configuration
🎉 Ready for production?
When your integration is tested in sandbox, go to and request a production key upgrade. Typical review takes 1–3 business days.

API Reference

Base URL: https://ehr.myrxwallet.io/api/v1

All endpoints require Authorization: Bearer <token> unless marked Public.

Developer Portal

MethodEndpointDescriptionAuth
POST/developer/registerRegister app — returns sandbox key instantlyPublic
GET/developer/sandbox/tokenExchange API key for sandbox bearer tokenX-Api-Key
POST/developer/keysCreate additional API key for appJWT
GET/developer/keys?app_id=…List keys (prefix only, never full)JWT
POST/developer/keys/{id}/rotateRevoke + reissue keyJWT
POST/developer/keys/{id}/revokePermanently revoke keyJWT
GET/developer/stats?app_id=…Usage stats: request count, last usedJWT
GET/developer/statusPublic platform statusPublic

FHIR R4 Resources

MethodEndpointResourceScope
GET/fhir/r4/metadataCapability StatementPublic
GET/fhir/r4/Patient/{id}Patient demographicspatient/*.rs
GET/fhir/r4/ObservationLab results, vitalspatient/*.rs
GET/fhir/r4/MedicationRequestPrescriptionspatient/*.rs
GET/fhir/r4/ConditionDiagnoses, conditionspatient/*.rs
GET/fhir/r4/AllergyIntoleranceAllergiespatient/*.rs
GET/fhir/r4/ImmunizationImmunization recordspatient/*.rs
GET/fhir/r4/DiagnosticReportDiagnostic reportspatient/*.rs
GET/fhir/r4/ProcedureProcedurespatient/*.rs
GET/fhir/r4/CarePlanCare planspatient/*.rs
GET/fhir/r4/$exportBulk data export (NDJSON)system/*.rs

SMART on FHIR OAuth

MethodEndpointDescription
GET/.well-known/smart-configurationSMART discovery document
GET/oauth/authorizeAuthorization endpoint (PKCE)
POST/oauth/tokenToken exchange
POST/oauth/introspectToken introspection
POST/oauth/revokeRevoke token
POST/oauth/registerDynamic client registration
GET/oauth/jwksServer public JWKS

Drug Safety

MethodEndpointDescription
POST/dscsa/verify-provenanceDSCSA drug provenance check
GET/dscsa/recallsFDA active drug recalls
GET/dscsa/recalls/{ndc}Recalls by NDC code
GET/dscsa/patient-alerts/{pid}Personalized recall alerts for patient

Consent & Access

MethodEndpointDescription
POST/consent/requestRequest patient consent (notifies patient)
GET/consent/qr/{patient_id}QR code token (10 min TTL)
GET/consent/audit/{patient_id}SHA-256 consent audit log

SDK Documentation

Package: @myrx-token/mrx-access  ·  Version: 0.1.0

TypeScript-first npm SDK for MyRxWallet platform integrations.

bash — Install
npm install @myrx-token/mrx-access
# or
yarn add @myrx-token/mrx-access

Constructor

typescript
import { MRxAccess } from '@myrx-token/mrx-access';

const client = new MRxAccess({
  apiKey: 'mrx_sb_…',            // required
  environment: 'sandbox',        // 'sandbox' | 'production'
  baseUrl: 'https://ehr.myrxwallet.io', // optional override
  timeout: 30000,                // optional ms, default 30s
});

Authentication

typescript
// Get sandbox bearer token (4h TTL)
const token = await client.getSandboxToken();
// Returns: { access_token, token_type, expires_in, scope }

// SMART on FHIR OAuth (production — patient authorization)
const authUrl = client.getAuthorizationUrl({
  clientId: 'your-smart-client-id',
  redirectUri: 'https://yourapp.com/callback',
  scope: 'openid fhirUser launch/patient patient/*.rs',
  launchContext: launchToken,  // optional EHR launch
});
// Redirect user to authUrl, then handle callback
const tokens = await client.exchangeCode({ code, codeVerifier, redirectUri });

FHIR Client

typescript
// Set bearer token first
client.setToken(access_token);

// ── Get patient ──
const patient = await client.fhir.getPatient('pid-123');

// ── Search resources ──
const bundle = await client.fhir.search('MedicationRequest', {
  patient: 'pid-123',
  status: 'active',
  _count: 50,
});

// ── Get specific resource ──
const obs = await client.fhir.read('Observation', 'obs-id');

// ── Capability statement ──
const caps = await client.fhir.metadata();

// ── Supported resource types ──
// Patient · Observation · MedicationRequest · Condition
// AllergyIntolerance · Immunization · Procedure · DiagnosticReport
// DocumentReference · Goal · CarePlan · Practitioner
// Organization · Coverage · Encounter

Drug Safety

typescript
// Verify drug provenance (DSCSA)
const prov = await client.drug.verifyProvenance({ ndc: '12345-678-90' });

// FDA recalls for an NDC
const recalls = await client.drug.getRecalls('12345-678-90');

// Patient personalized alerts
const alerts = await client.drug.getPatientAlerts('pid-123');

Scopes Reference

patient/*.rs
Read + search all patient-context FHIR resources. Standard for patient-facing apps.
patient/*.r
Read individual patient resources (no search). More restrictive.
system/*.rs
System-level FHIR access (bulk export). Requires full access level.
openid fhirUser
OpenID Connect identity + FHIR user resource link.
offline_access
Refresh token issuance (90-day TTL per ONC requirement).
launch/patient
EHR launch context — patient pre-selected when app launched from EHR.
sandbox:all
Sandbox-only scope. Grants access to all synthetic endpoints.

Error Codes

HTTPCodeMeaning
400invalid_requestBad parameters
401invalid_tokenMissing, expired, or revoked token/key
403insufficient_scopeToken lacks required scope
404not_foundResource not found
409conflictDuplicate registration
429rate_limitedToo many requests — see Retry-After header
500server_errorPlatform error — contact support@myrxwallet.io

Get Your API Key

Register your app below. A sandbox API key is issued instantly — no approval required. Production keys are reviewed within 1–3 business days.

Register Developer App
All fields are required unless marked optional. Your key will be displayed once — save it immediately.
🎉
Sandbox Key Issued
Copy and save your key now — it will not be shown again.
⚠️ This key is displayed ONCE. Store it securely (e.g., environment variable or secrets manager). It cannot be recovered.
Your API Key
App ID
Environment
SANDBOX
Sandbox Base URL
https://ehr.myrxwallet.io/api/v1
Expires
365 days
Next steps:
1
Read the — you'll be making API calls in minutes.
2
Install @myrx-token/mrx-access and call getSandboxToken().
3
When ready for production, email dev@myrxwallet.io with your App ID to request a production key upgrade.
Rate Limits
TierRequests/minRequests/day
Sandbox605,000
Basic12050,000
FHIR300500,000
FullUnlimitedUnlimited