Click here to Skip to main content
Click here to Skip to main content
Go to top

Introduction to E-prescribing System

, 11 Sep 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 a real time implementation of RxNorm coding.

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.

Disclaimer

This article is just an introduction to the E-prescribing System. I tried covering the basic concepts and have shared with you code snippets for RxNorm. I hope it should help you in implementing the whole system.  

Introduction

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’s refills run out.
  • Supports the medication management process – prescribe, transmit, dispense, administer, and monitor.

Workflow of the 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. All patients within 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.
  8. Note: The prescriber may modify the prescription depending on any drug-drug or drug-allergy alerts.

  9. The prescription is then sent electronically to the pharmacy system.
  10. 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 interoperability.

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 

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.

Background

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 a complex healthcare product, you have to decide and implement with the right technology and architecture.

We will concentrate on RxNorm. How to get drugs so that the physician can prescribe medications to patients. 

Below is the code block to retrieve the RxNorm drug information. Note: We are using a web service http://rxnav.nlm.nih.gov/RxNormDBService.xml 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)
{
    SpellingSuggestions("ambienn");
    GetDrugs("varenicline");
    GetApproxMatch("ACETAMINOPHEN 500 MG CAPLET");
    Console.ReadLine();
}

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));
            Console.WriteLine(concept.STR);
        }
    }
}

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)
    {
        Console.WriteLine(suggestion);
    }
}

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 - http://rxnav.nlm.nih.gov/REST/Prescribe/.

static void Main(string[] args)
{
    var client = new HttpClient();
    var request = new HttpRequestMessage()
    {
        RequestUri = new Uri("http://rxnav.nlm.nih.gov/REST/Prescribe/approx?term=zocor%2020%20mg%20oral"),
        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();
         
            Console.WriteLine(json.Result.ToString());
        });
    task.Wait();
    Console.ReadLine(); 
}

References

Below are the resources through which I got 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. 

History

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

License

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

Share

About the Author

Ranjan.D
Web Developer
United States United States
Profile
 
Around 9 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
 
Others:
 
TTD, BDD
 
Education
 
B.E (Computer Science)
 
CodeProject Contest So Far:
 
1. Windows Azure Developer Contest - HealthReunion - A Windows Azure based healthcare product , link - http://www.codeproject.com/Articles/582535/HealthReunion-A-Windows-Azure-based-healthcare-pro
 
2. DnB Developer Contest - DNB Business Lookup and Analytics , link - http://www.codeproject.com/Articles/618344/DNB-Business-Lookup-and-Analytics
 
3. Intel Ultrabook Contest - Journey from development, code signing to publishing my App to Intel AppUp , link - http://www.codeproject.com/Articles/517482/Journey-from-development-code-signing-to-publishin
 
4. Intel App Innovation Contest 2013 - eHealthCare - http://www.codeproject.com/Articles/635815/eHealthCare
 
5. Grand Prize Winner of CodeProject HTML5 &CSS3 Article Content 2014

Comments and Discussions

 
QuestionMicrosoft Solutions files? Pinmembersilvacarl6-Nov-13 8:38 
AnswerRe: Microsoft Solutions files? PinprofessionalRanjan.D6-Nov-13 14:13 
GeneralRe: Microsoft Solutions files? Pinmembersilvacarl6-Nov-13 14:15 
GeneralMy vote of 5 PinprofessionalMohamedKamalPharm19-May-13 1:24 
GeneralRe: My vote of 5 PinprofessionalRanjan.D19-May-13 1:51 
Thanks for your inspiration comment.
Ranjan.D

NewsOur e-prescribing system (medula) in Turkey.... PinmemberMehmet Oruc26-Mar-13 11:04 
BugRe: Our e-prescribing system (medula) in Turkey.... PinmemberRanjan.D26-Mar-13 14:44 
GeneralMy vote of 5 Pinmembersraoh14-Mar-13 8:02 
GeneralRe: My vote of 5 PinmemberRanjan.D14-Mar-13 17:31 
GeneralHelpful Info PinmemberPrasad Khandekar14-Mar-13 5:00 

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

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

| Advertise | Privacy | Mobile
Web03 | 2.8.140916.1 | Last Updated 11 Sep 2013
Article Copyright 2013 by Ranjan.D
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid