Click here to Skip to main content
13,358,041 members (58,522 online)
Click here to Skip to main content
Add your own
alternative version


24 bookmarked
Posted 14 Mar 2013

Introduction to E-prescribing System

, 14 Mar 2013
Rate this:
Please Sign up or sign in to vote.
In this blog we will see what is an E-prescribing System. Its benefits and various standards used in the system. Also we will see real time implementation of RxNorm Coding.
This is an old version of the currently published article.

Editorial Note

This article appears in the Third Party Products and Tools section. Articles in this section are for the members only and must not be used to promote or advertise products in any way, shape or form. Please report any spam or advertising.


This article is just an introduction to  E-prescribing System. I tried covering the basic concepts and have shared the piece of code which is may help you in implementing the whole system.  


In this blog we will see a healthcare E-prescribing System (eRX) also know as Ambulatory electronic prescribing. 

E-prescribing is a software program or application that allows prescribers to:

• Electronically access patients health information such as drug benefits , medication history etc.

• Electronically transmit the prescription to the patient’s choice of pharmacy.

• Receive electronically transmitted prescription renewal requests from a pharmacy when the patient runs out.

• Supports the medication management process – prescribe, transmit, dispense, administer and monitor.


Workflow of E-prescribing system

1. Patient visits a physician.

2. The physician’s e-prescribing system collects the patient’s consent and demographic information which includes patient name, date of birth, gender and zip code etc.

3. The application connects to it’s network to uniquely identify the patient in a master patient index maintained by an e-prescribing network. Every patient with the system is assigned with a unique identifier known as Master patient Index (MPI) and is being used to uniquely identify the patient with in a system.

4. Request for patient information is sent to connected payers and pharmacies.

5. The payer returns prescription benefit, medication history information etc to the physician’s e-prescribing system.

6. The physician then validates the information with the patient. 

7. Physician reviews the patient’s eligibility and formulary information, if everything goes well the physician selects the appropriate medication therapy, selects the patient’s pharmacy, and generates the e-prescription.

Note: The prescriber may modify the prescription depending on any drug-drug or drug-allergy alerts.

8. The prescription is then sent electronically to the pharmacy system.

9. Patients collects the prescription from the pharmacy of his/her choice.

When the patient’s refills run out, the pharmacy can send an electronic message to the physician’s application to request a prescription renewal authorization and the physician can electronically authorize or deny the prescription renewals.


Benefits of E-prescribing

  • Saves time in the practice and pharmacy.
  • Reduce the potential adverse drug being prescribed.
  • Reduce drug costs through increased formulary compliance, use of generics and other low cost alternative medications.
  • Enable payers to communicate information to prescribers that may lead to improved quality, and better patient experience.
  • Enable payers to communicate information to patients that will more fully engage them in their care – condition and therapy education, medication adherence education, care reminders. 

These types of systems are so complex ones which connects to various other systems for querying and importing or exporting the patient health information. Now we will see some of the standards used to exchange the patient health information keep in mind of interoperatibility.

Standards for data exchange

It is very important for one to understand the below standards if you are dealing with the importing or exporting of patient healthcare information.  CDA/CCD as the most common standardized document model used for clinical document exchange. CCR is becoming obsolete , still one has to support this model of document exchange as most of the systems do support this format the least.  

HL7 Clinical Document Architecture (CDA) 

CDA is a document markup standard that specifies the structure and semantics of a clinical document used to exchange patient health information ex: Discharge summary, Progress note etc. A CDA document can be transferred within a message, and can also be used independently of the transferring message.

The CDA documents are encoded in Extensible Markup Language (XML) contains a header and a body. The header identifies and classifies the document and provides information on authentication, the encounter, the patient and the involved providers. The body contains the clinical report and can be structured or not. CDA defines an optional Medication section for a patient's current and prior medication information, as well as the patient's prescription history. 

Continuity of Care Record (CCR)

CCR is a standard developed by ASTM International standard used for exchanging the patient health information. It is a XML based standard contains various sections such as patient demographics, insurance information, diagnoses and problem list, medications, allergies and care plan. These represent a "snapshot" of a patient's health data. 

Continuity of Care Document (CCD

CCD is a CDA Release 2 implementation that maps the Continuity of Care Record (CCR) elements into a CDA representation, harmonizing CCR and CDA into a common framework. CCD standard was developed by HL7 however it wouldn't come without the collaborative effort of ASTM (American Society for Testing and Materials). 

The CCD represents a complete implementation of CCR and it combines the best of HL7 technologies with the richness of CCR’s clinical data representation. 

Coding System   


RxNorm is a standardized nomenclature for prescribable medications. RxNorm is a catalog of the standard names given to clinical drugs and drug delivery devices to enable interoperability and clear communication between electronic systems, regardless of software and hardware compatibility.


Healthcare background knowledge is required to understand the terminologies and concepts of healthcare system.

Using the code 

Please note that we are not going to discuss here how the system is being implemented or how it can be implemented. The reason being , it's being a complex healthcare product , one has to decide and implement with the right technology , architecture etc. 

We will concentrate on the RxNorm. How to get the drugs so that the physician can prescribe the medicines for a patient.  

Below is the code block to retrieve the RxNorm Drug information. Note: We are using a web service and generate a class named DbManagerService from the WSDL.

Create a DbManagerService instance and make a call to getDrugs with the drug name. That's all , it will get you the list of RxConceptGroup. i.e the matching drugs. 

static DBManagerService rxnormService = new DBManagerService();

static void Main(string[] args)
            GetApproxMatch("ACETAMINOPHEN 500 MG CAPLET");
static void GetDrugs(string name)
            RxConceptGroup[] rxConceptGroup = rxnormService.getDrugs(name);
            foreach (var item in rxConceptGroup)
                var rxConcept = item.rxConcept;
                foreach (var concept in rxConcept)
                    Console.WriteLine(string.Format("Rxcui = {0}", concept.RXCUI));

Below is the code block for retrieving the drugs based on the approximate text match.

static void GetApproxMatch(string name)
            RxMatchInfo[] rxMatchInfo = rxnormService.approxMatch(name);
            foreach (var item in rxMatchInfo)
                Console.WriteLine(string.Format("Rxcui = {0}, Rxaui = {1}, score = {2}, rank = {3}", item.RXCUI, item.RXAUI, item.SCORE, item.RANK));

Below is the code block gives the spelling suggestion for a given drug name

static void SpellingSuggestions(string name)
           var suggestions = rxnormService.getSpellingSuggestions(name);
           foreach (var suggestion in suggestions)

Below is the code snippet if wish to retrieve RxNorm codes as WebAPI. 

We are using HttpClient and HttpRequestMessage to fetch the RxNorm codes with the help of WebAPI   -   

static void Main(string[] args)
            var client = new HttpClient();
            var request = new HttpRequestMessage()
                RequestUri = new Uri(""),
                Method = HttpMethod.Get                
            request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
            var task = client.SendAsync(request)
                .ContinueWith((taskwithmsg) =>
                    var response = taskwithmsg.Result;
                    var json = response.Content.ReadAsStringAsync();


Below are the resources through which I get to know more about this system  

Points of Interest

It's very interesting to learn and share things in healthcare domain. While researching and working with this blog , I came to know not many systems implemented RxNorm. I would consider it's a most important thing that one has to be aware and implement so that there won't be any ambiguity while prescribing medications and what pharmacy or other system which makes use of it understands. 

Please let me know about your thoughts or feedback's. It's very important for me to understand your interests so that I can try putting effort in explaining things to the best of my knowledge in healthcare field. 


Version 1.0 - 3/13/2013 - Initial Version with code samples for RxNorm. 


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Web Developer
United States United States

Around 10 years of professional software development experience in analysis, design, development, testing and implementation of enterprise web applications for healthcare domain with good exposure to object-oriented design, software architectures, design patterns, test-driven development and agile practices.

In Brief

Analyse and create High Level , Detailed Design documents.
Use UML Modelling and create Use Cases , Class Diagram , Component Model , Deployment Diagram, Sequence Diagram in HLD.

Area of Working : Dedicated to Microsoft .NET Technologies
Experience with : C# , J2EE , J2ME, Windows Phone 8, Windows Store App
Proficient in: C# , XML , XHTML, XML, HTML5, Javascript, Jquery, CSS, SQL, LINQ, EF

Software Development

Database: Microsoft SQL Server, FoxPro
Development Frameworks: Microsoft .NET 1.1, 2.0, 3.5, 4.5
UI: Windows Forms, Windows Presentation Foundation, ASP.NET Web Forms and ASP.NET MVC3, MVC4
Coding: WinForm , Web Development, Windows Phone, WinRT Programming, WCF, WebAPI

Healthcare Domain Experience

CCD, CCR, QRDA, HIE, HL7 V3, Healthcare Interoperability


B.E (Computer Science)

CodeProject Contest So Far:

1. Windows Azure Developer Contest - HealthReunion - A Windows Azure based healthcare product , link -

2. DnB Developer Contest - DNB Business Lookup and Analytics , link -

3. Intel Ultrabook Contest - Journey from development, code signing to publishing my App to Intel AppUp , link -

4. Intel App Innovation Contest 2013 - eHealthCare

5. Grand Prize Winner of CodeProject HTML5 &CSS3 Article Contest 2014

6. Grand Prize Winner of CodeProject Android Article Contest 2014

7. Grand Prize Winner of IOT on Azure Contest 2015

You may also be interested in...


Comments and Discussions

Discussions on this specific version of this article. Add your comments on how to improve this article here. These comments will not be visible on the final published version of this article.
QuestionMicrosoft Solutions files? Pin
silvacarl6-Nov-13 9:38
membersilvacarl6-Nov-13 9:38 
AnswerRe: Microsoft Solutions files? Pin
Ranjan.D6-Nov-13 15:13
professionalRanjan.D6-Nov-13 15:13 
GeneralRe: Microsoft Solutions files? Pin
silvacarl6-Nov-13 15:15
membersilvacarl6-Nov-13 15:15 
GeneralMy vote of 5 Pin
MohamedKamalPharm19-May-13 2:24
professionalMohamedKamalPharm19-May-13 2:24 
GeneralRe: My vote of 5 Pin
Ranjan.D19-May-13 2:51
professionalRanjan.D19-May-13 2:51 
NewsOur e-prescribing system (medula) in Turkey.... Pin
Mehmet Oruc26-Mar-13 12:04
memberMehmet Oruc26-Mar-13 12:04 
BugRe: Our e-prescribing system (medula) in Turkey.... Pin
Ranjan.D26-Mar-13 15:44
memberRanjan.D26-Mar-13 15:44 
GeneralMy vote of 5 Pin
sraoh14-Mar-13 9:02
membersraoh14-Mar-13 9:02 
GeneralRe: My vote of 5 Pin
Ranjan.D14-Mar-13 18:31
memberRanjan.D14-Mar-13 18:31 
GeneralHelpful Info Pin
Prasad Khandekar14-Mar-13 6:00
memberPrasad Khandekar14-Mar-13 6:00 
GeneralRe: Helpful Info Pin
Ranjan.D14-Mar-13 18:43
memberRanjan.D14-Mar-13 18:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.180111.1 | Last Updated 14 Mar 2013
Article Copyright 2013 by Ranjan.D
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid