RxConcile is a modern, SMART on FHIR web application designed to assist healthcare providers in the medication reconciliation process. By integrating directly with Electronic Health Record (EHR) systems via FHIR standards, it provides a streamlined interface for identifying therapeutic duplications, managing active prescriptions, and reviewing patient conditions.
Try out the application connected to a public EHR sandbox: Launch Demo
Note: For the best experience, please select one of the first 2 patients in the sandbox to see the conflict detection in action.
Disclaimer: The live demo connects to the public SMART HealthIT FHIR Sandbox. Service availability depends on their server status and may experience occasional downtime.
- SMART on FHIR Integration: Seamlessly authenticates and retrieves patient data (Demographics, Medications, Conditions) from FHIR-compliant EHRs (tested with Logica/Meld Sandbox).
- Therapeutic Duplication Detection: Leverages the NLM RxNav API to analyze drug classes (ATC, VA, MOA) and automatically flag potential therapeutic duplications (e.g., two different NSAIDs prescribed simultaneously).
- Real-Time Write-Back:
- Discontinue: Allows providers to stop duplicate or unnecessary medications directly from the dashboard.
- Prescribe: Interface to prescribe new medications with dosage instructions, writing
MedicationRequestresources back to the server.
- Patient Context: Displays key patient demographics (Name, DOB, Sex) and a list of active conditions/diagnoses.
- Modern UI/UX: Built with Shadcn UI and Tailwind CSS for a clean, accessible, and responsive professional healthcare interface.
- Framework: Next.js 14 (App Router)
- Language: TypeScript
- Styling: Tailwind CSS
- Components: Shadcn UI
- FHIR Client:
fhirclient(SMART on FHIR JS Client) - Icons:
lucide-react - External APIs: National Library of Medicine (NLM) RxNav API
Before running the application, ensure you have the following:
- Node.js: Version 18.17 or later.
- SMART on FHIR Sandbox: An account with a FHIR sandbox provider like Logica (Meld) or the Epic on FHIR Sandbox.
- Client ID: You must register an app in your sandbox to obtain a
Client ID.- Launch URL:
http://localhost:3000/launch - Redirect URL:
http://localhost:3000 - Scopes:
launch patient/MedicationRequest.read patient/MedicationRequest.write patient/Patient.read patient/Condition.read online_access openid profile
- Launch URL:
-
Clone the repository
git clone https://github.com/Xelem/Rx-Concile.git cd Rx-Concile -
Install dependencies
npm install
-
Configure Environment Variables Create a
.env.localfile in the root directory and add your SMART Client ID:NEXT_PUBLIC_BASE_URL=http://localhost:3000 NEXT_PUBLIC_MELD_CLIENT_ID=your_client_id_here
Start the Next.js development server:
npm run devThe application will be available at http://localhost:3000.
Since this is a SMART on FHIR app, it expects to be launched by an EHR. You cannot simply visit http://localhost:3000 directly without a launch context (unless testing specific standalone components).
- Go to your FHIR Sandbox (e.g., Logica).
- Select a Patient from the sandbox interface.
- Launch the App: Find your registered "RxConcile" app and click Launch.
- The sandbox will redirect to
http://localhost:3000/launch, perform the OAuth2 handshake, and then land on the main dashboard.
Upon login, you will see the Active Medications list.
- Review: See all active prescriptions for the patient.
- Alerts: Red warning boxes appear at the top if therapeutic duplications are detected (e.g., "Multiple active medications found in class: NSAID").
- Dismiss: Click "Dismiss Warning" to hide an alert for the current session.
- Resolve: Click the Stop button next to a specific medication inside the alert box to discontinue that drug. This sends a request to the FHIR server to update the status to
stopped.
- Click the Add Medication button in the header.
- Select a medication from the preset list (e.g., "Lisinopril").
- Enter Dosage Instructions (e.g., "10mg daily").
- Click Confirm Prescription.
- The app will write the new order to the EHR and refresh the list.
Toggle the view using the View Conditions button to see a list of the patient's active diagnoses and problems.
rx-concile/
├── app/
│ ├── context/ # SmartContext (FHIR client & state)
│ ├── launch/ # SMART Launch handler (/launch)
│ ├── page.tsx # Main Dashboard
│ └── layout.tsx # Root layout
├── components/
│ ├── ui/ # Shadcn UI primitives (Button, Dialog, etc.)
│ ├── AlertBox.tsx # Feedback alerts
│ ├── AlertSection.tsx# Clinical warnings
│ ├── MedicationList.tsx
│ └── ConditionList.tsx
├── lib/
│ ├── rxnav.ts # Service for NLM RxNav API interactions
│ ├── utils.ts # Tailwind class merger
│ └── medication-utils.ts # Logic for finding duplicates
└── public/
- Patient-Friendly Summaries: AI-driven "Plain English" explanations of complex medical regimens for patients.
- Restart Logic: Workflows to handle medication restart logic for previously discontinued drugs.
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request