Quick Install Tutorial

More information is available at the ePostRx Community

Table Of Contents

What is ePostRx?

ePostRx is the industry's only single source, enterprise pharmacy solution that allows customers to create unique dispensing work flows for Electronic Scripts, Retail, Chain Retail, Mail-Order and Central Fill business models. Because ePostRx is a browser based, multi-tiered network solution, your Total Cost of Ownership (TCO) and cost per prescription fill are reduced resulting in increase profit margins! 

Our ePostRx solution suite assists pharmacies in managing their prescriptions more efficiently to respond to such market challenges as the pharmacist shortage, electronic prescriptions, various business workflows and skyrocketing prescription volumes.  Our solutions support all pharmacy business models, including Electronic Scripts, Retail, Chain Retail, Mail-Order and Central Fill business models. ePostRx can be applied to any pharmacy model to complement or enhance business to meet the demands of  ePharmacy. Whether you are a Provider, Clinic, Retail Chain, Mail-Order or a Connectivity Hub (just to name a few), the ePostRx product suite can help your business create, connect, manage and control your electronic prescription transactions with your pharmacy business partners, store locations and workflow queues.

ePostRx Product Suite

ePostRx Standard  
Core product that allows transfer of SCRIPT transactions between healthcare trading partners. Messages are persisted in trading partner mailbox for audit purposes. Includes Client Toolkit which provides the ability to embed ePostRx SCRIPT API into business applications. All server transactions can be secured via Public Key Infrastructure (PKI) and sent/retrieved from the ePostRx server programmatically via the appropriate SCRIPT message.

ePostRx Professional  
Extension of core product that
includes our WebConnect component which can easily be integrated into your business web portal. This feature provides a web mail user interface for customers who do not have the resources to implement the toolkit, but wish to send/receive SCRIPT messages. WebConnect supports both Physician-to-Pharmacy and Pharmacy-to- Physician SCRIPT messages.

ePostRx Retail Fill
PostRx Retail Fill automates the retail based prescription-fulfillment process, from Rx/Refill receipt and insurance adjudication, to DUR and dispensing. ePostRx Retail Fill  is ideal for retail chains and high-volume pharmacies operated by insurers, integrated health systems, supermarkets, or wholesalers.

ePostRx Order Fill
ePostRx Order Fill automates the order based prescription-fulfillment process, from Order/Rx/OTC receipt and insurance adjudication, to DUR and dispensing. Furthermore, ePostRx Order Fill is designed to maximize efficiency across any mail order service or specialty mail facilities.  

ePostRx DMAT
Disaster Medical Assistance Teams or DMATs deploy to disaster sites with sufficient supplies and equipment to sustain themselves for a period of 72 hours while providing medical care at a fixed or temporary medical care site. ePostRx DMAT  is a simple and mobile prescription solution that offers the ability of DMAT or DHS personnel to electronically fill prescriptions from a laptop rather than filling our paperwork at the scene of a disaster or emergency. DMAT personnel can load customized formulary, define custom monograph information, monitor inventory, print labels and patient education. Because all prescriptions are donated free of charge, there is no need for DUR, Third Party claims, pricing updates etc..

ePostRx Enterprise Fill
ombines our core ePostRx SCRIPT and B2B ecommerce engines into a single source, end-to-end, enterprise web solution for all your SCRIPT transactions, Prescription Management and Rx Dispensing requirements. Allows customers to create unique dispensing work flows for Electronic Scripts, Retail, Chain Retail, Mail-Order and Central Fill business models.

ePostRx Overview

All our open source ePostRx products and services are built from the ground up using the latest web enterprise technologies and open source projects. Because we employ a three-tier architecture model, our solutions can be configured and scaled to meet the enterprise needs of any client network.

About This Tutorial

This tutorial is meant to give you a quick - yet useful - primer on the basic capabilities of ePostRx, and how to use ePostRx within your own software project. It may take you approximately one hour to read this document end-to-end. Aside from teaching you how to use ePostRx, this document also aims to help you answer the question: "is ePostRx the right solution for my project's pharmacy needs?"


Please provide feedback as to this document's: usefulness, completeness, grammar errors, points of confusion, etc. This can be done via the ePostRx user forum or mailing list that can be found at the project's development site.

About ePostRx Architecture

ePostRx is comprised of 4 main components:

  1. B2B Transaction Engine - runs on a Application Server (AS). Currently JBoss is the only AS supported.
  2. Management  UI console - web console can be deployed with the JBoss AS deploy directory where local EJB interfaces are used. You can run in de-coupled mode where the WAR file is deployed on a different server than the B2B Transaction server and RMI interfaces are used.
  3. Client  toolkit - used by clients to build and send NCPDP Script messages to the Server.
  4. Relational Database - The  ePostRx RDBMS provides the data repository to which transactions are logged and configurations are maintained. Currently ANSHealth supports Microsoft SQL Server 2000+.  Plans are currently underway to add support for MysSql (open-source Database), Oracle and Sybase. Data access is currently through JDBC2.0+ Type 4 drivers that support the respective DB vendor. ePostRx currently uses drivers from Inet software.

ePostRx Transaction Engine
The  ePostRx ™ Transaction engine runs on any J2EE compliant application server such as JBoss or Weblogic. Features include:

ePostRx™ Features
Developed using the latest distributed technologies such as Java's J2EE, XML and XSL.
Security Management through JCE and Public Key Infrastructure (PKI) and X509 version 3 Digital Certificates to provide non-repudiation (proof of origin and receipt) between business partners.
Support for all industry implementation of the NCPDP SCRIPT standard which includes the ability to translate transactions between various versions/releases of the SCRIPT implementation.
Provides Simple Text Messaging (STM) between partners, independent of the SCRIPT standard.
SCRIPT Forwarding to other standalone remote  ePostRx™ systems or other external processes to allow expanded workflow across business regions, store locations or workflow queues.
Support for Direct Connect (P2P) and Mailbox communication modes.
Support for both EDI and XML message formats.
Rules based routing of prescription data for more efficient pharmacy workflow among internal and external business entities.
Auto-contact Management to alert business users of received events.
Inventory Verification Engine that broadcasts inventory requests to all business entities when a NEWRX or REFILL Rx is received. This allows for further streamlining of workflow to verify inventory is on hand prior to filling a request. Combined with the Rules Engine, this a VERY powerful feature that can increase your productivity across all locations resulting in higher business margins.
XML based configuration files to allow easy customization of environment settings and loading of default SCRIPT data.
Deployed as a standard Enterprise Application Archive or EAR file.

ePostRx ™ Management Console
The  ePostRx ™ Management Console is a web portal that allows users to effectively manage and monitor their prescription business transactions. Features include:

ePostRx™ Management Console Features
Developed using Struts-like framework with MVC Model II design pattern.
Provides centralized management of all accounts, business entities and external users.
Control and limit access to user defined areas by assigning roles to users.
Provides Certificate Authority (CA) functionality to manage Public Key Infrastructure (PKI) and X509 Digital Certificate information for all associated business entities.
Track and monitor NCPDP SCRIPT message transactions between business entities.
Apply rules to NCPDP SCRIPT message transactions to intelligently re-route prescription data between business entities. The workflow possibilities are endless!
Create custom reports that can be added to the  ePostRx ™Management Console using the  ePostRx  Management Console Report framework.
Runs on any web server environment that supports Java Server Pages (JSP) and the Java Servlet API 2.2+. 
Deployed as a standard Web Application Archive or WAR file.
Configuration files to allow easy customization of environment settings.
Menu sensitive Help to assist users per active menu.

ePostRx ™ Client Toolkit
The  ePostRx ™ client toolkit provides the tools necessary to securely communicate with the ePostRx™  Transaction engine. It provides:

ePostRx™ Client Toolkit Features
Fully compliant Java API implementation of the NCPDP SCRIPT standard. API allows users to build and send NCPDP formatted SCRIPT XML messages to the  ePostRx ™ server for processing.
Security Tools necessary to generate a Public/Private Key Pair and a X.509 Version 3 Digital Certificate to communicate with the  ePostRx™ Transaction engine. These keys are used to authenticate and sign all transactions between you and ePostRx™. 
ePostRx™Bridge, which allows user's who don’t support Java, to natively bridge heterogeneous systems such as Pharmacy Management Systems desktops to allow seamless transfer of ePostRx™ client/server messages. The bridge supports two transfer methods:
  • Native Bridge which uses Java Native Interface (JNI) to ANSI C

  • IP Bridge, which uses a local IP listener to communicate between the Java API and native platform.

XML based configuration files to allow easy environment customization of client security, connection and log settings.
API supports both XML and standard EDI message formats.

ePostRx ™ Relational Database Management System
The  ePostRx™ RDBMS provides the data repository to which transactions are logged and configurations are maintained. Currently ANSHealth supports Microsoft SQL Server 7.0 and Microsoft SQL Server 2000.  Plans are currently underway to add support for Oracle and Sybase. Data access is currently through JDBC2.0+ Type 4 drivers.


  IMPORTANT - Proprietary Vendor APIs

Although ePostRx is free and 100% GPL, there are a couple vendor proprietary APIs and source code files (~10) that are not included in the final GPL software bundle. These files were intentionally omitted because of non-disclosure agreements currently enforced between ANSHealth and third party vendors who would not allow ANSHealth to bundle their associated code. These areas include:

  1. Drug Database Interface (Medispan, First Databank...)
  2. Interactive Voice Recognition (Telemanager,Ateb,Voice Tech...)
  3. Auto Fulfillment (McKesson,ScriptPro,ProRata,AutoMed...)

If you wish to gain access to these files, you will need to purchase a commercial license so ANSHealth can enforce these agreements. However, ANSHealth would suggest that the community pressure those company's mentioned above to release their APIs/specifications to the ePostRx community for future GPL releases. ANSHealth believes most of  these APIs or specifications are just conduits to their actual Intellectual Property (data or hardware) and should be made available to the community. For example, it's not like we're asking them to make available the Drug Database data or specifications on the IVR or fulfillment hardware, just the APIs to access it!

Most of the support jars are included in the software bundle and are available for free and licensed under various Open Source licenses (GNU GPL, LGPL, Apache, BSD etc..). With exception to those proprietary vendors listed above, the other jars you will need to download to build ePostRx are the following:

  1. Swiss Sql One AP 1.1(contains jar file)
  2. Quartz Scheduler version 1.5.1 (contains DB schema and jar file)


System Requirements

The following details the current system requirements for installing ePostRx. Any deviation will most likely result in installation issues. We urge you to be adventurous in exploring other platforms and versions and to share your experiences to the ePostRx community, But if time is of the essence, please adhere to the system requirements posted within.

Operating System

Windows 2000+, Windows XP, Windows NT with at least 1 GB memory and 40GB disk space


ePostRx has been tested using JDK1.4+


ePostRx currently supports MS SQL Server 2000+

JDBC Drivers

ePostRx has been tested using JDBC 2.0+ Type 4 Drivers from Inet Software. You will need at least a minimum of 20 connections, preferably unlimited connections.

For INET JDBC drivers, you'll need to set FULLTRAN=false

Application Server

ePostRx currently supports JBoss Application Server (AS) version 4.0.1 with Tomcat 5.0.

Web Server

ePostRx has been tested using Tomcat 5.0+ for precompiling JSPs


Note: Additional platforms are under test.

Building the software

To build ePostRx you will need to unzip the source bundle. The bundle will extract to a directory called  drive:\advancenet.  Once unzipped, you should have a software tree that looks something like this:

epostrx packages

root - Advancenet

    To build ePostRx, you will need to build three components:

  1. B2B Transaction Server (EAR)
  2. Web Console (WAR with precompiled or not precompiled JSPs)
  3. Toolkit (Zip file. Only if you need to send NCPDP scripts to the server)

ePostRx uses Jakarta ANT1.6+ to build the source files. Run the build.bat in each directory listed below to build the appropriate components:

  1. AnsHealthB2B/build  - builds the Jboss EAR file
  2. ansHealthConsole/build - Builds the UI Web WAR file
  3. ansHealthToolkit/build - builds the toolkit.zip file

You may have to tweak the build.bat to reflect your Java environment. Check out the build.xml files for the specific targets available to each build. Particularly the web console since you can build the JSPs in precompiled and non-precompiled mode. if you have the correct software tree as outlined above, the build.xml should run out-of-the-box with little or no change.

B2B ANT target

  1. build jboss - builds JBoss EAR ansHealthB2B.ear(EAR contains the EJBs and the B2B WAR files)

Web ANT targets

  1. build ui_developer - builds developer/test WEB WAR - ansHealthConsole.war (with non-precompiled JSPs ~10MB). This target is mainly used for development and testing o f new UI functionality. Compiles without the EJB interface. Can deploy to Tomcat 5.0 for testing.
  2. build jboss_deploy - builds production WEB WAR - ansHealthConsole.war(precompiled JSPs for JBoss deployment  ~16MB).

Toolkit ANT target

  1. build all - build all toolkit files into a toolkit zip file containing bundle of documentation , jars etc.


Installing ePostRx Schema and Stored Procedures

The  ePostRx RDBMS provides the data repository to which transactions are logged and configurations are maintained. The schema currently resides in ansHealthRDBMS/database. Currently ANSHealth only supports Microsoft SQL Server 2000+.  Plans are currently underway to add support for MysSql (open-source Database), Oracle and Sybase. Data access is currently through JDBC2.0+Type 4 drivers that support the respective DB vendor.

  1. Create an ePostRx DB instance
  2. Create a QUARTZ DB instance.
  3. The ePostRx DB Schema can be loaded manually via the MSSQL SQL Edit window by copying and applying the schema to a created database called ePostRx.
  4. You will also need to install the store procedures under ansHealthRDBMS/database/mssql. as well through the SQL Edit window. Try running the loadSP.bat file to load the SPs into the ePostRx DB. You may have to tweak the settings to connect to the schema.
  5. The QUARTZ DB Schema can be loaded manually via the MSSQL SQL Edit window by copying and applying the schema to  a created database called Quartz.


ePostRx Configuration File

The B2B and Console projects each contain a configuration file called advancenet.xml. These files contain all the environment settings for their respective deployment bean. The file is in XML format and the descriptors are pretty intuitive. To install ePostRx, the only attributes you need to be aware of are LOGGING and EPOSTRXDB settings. The rest can be tuned for the respective production environment.


Deploying ePostRx

ePostRx can be deployed in a single co-located server by deploying the production EAR and WAR files under JBoss/deploy/ans. Additionally, ePostRx can be deployed in decoupled mode on multiple servers. In this mode, the production UI WAR is deployed under Tomcat and the EAR file is deployed under JBoss. JNDI interfaces are used to communicate between the Tomcat<->JBoss remote EJB beans requests. These JNDI settings can be configured under the ePostRx Console and B2B XMML configuration files.

You can also deploy ePostRx for UI development on Tomcat alone using the ANT target UI_DEVELOPER to build the WEB WAR. This is primarily used for new UI functionality that does not require the EJB B2B backend.


Creating ANSHome

Static ePostRx Deployment

When you compile the EAR and the UI WAR, configuration files are packaged into each file. At B2B and Console startup, if the java property '-Dans.home' is not defined, the application looks internally to the WEB-INF to extract the environment settings from the prepackaged configuration files. If you deploy to a static target environment, you can prepackage your settings prior to building the software.

Dynamic ePostRx Deployment

Additionally, you can create an external directory to house configuration information. To do so, create a external directory called 'drive:\anshome'.  In the startup script for both JBOSS and Tomcat, include the
java property '-Dans.home=drive:\anshome'. You can do this by:

  1. Ccreating a new environment variable - SET ANSHOME = drive:\anshome. 
  2. Then in the startup scripts add '-Dans.home=%ANS_HOME%'.

At startup, the application will now look into this directory for the appropriate configuration files. However, since there is one advancenet.xml configuration file for the B2B and the Console, you must rename these files to match the PROJECT name within each configuration file. For example, the PROJECT setting for CONSOLE is ansHealthConsole and the B2B PROJECT setting in the configuration file is ePostRxB2B. Therefore, the systen will look in the ANSHOME directory for the following files:

  1. ansHealthConsole_advancenet.xml (CONSOLE configuration)
  2. ePostRxB2B_advancenet.xml (B2B configuration)


Installing/Running ePostRx B2B Transaction  Server

The ANSHealth B2B engine is packaged as an Enterprise Application Resource (EAR) file. It consists of various support jar files, as well as a Web Application Resource (WAR) file to provide the connectivity to the EJB via servlets for NCPDP SCRIPT processing. This software bundle is expected to be deployed on an ePostRx  support Application Server(AS).

JBOSS Production Installation


  1. Install JBoss create ANS.bat file to set the JAVA_HOME and other required environment variables. Have it call JBoss run.bat. Place in the JBoss \bin dir.
    NOTE: This file is really not necessary if you do not have other parameters to pass into run.bat. You can call run.bat directly.
  2. Extract the copy of the  ANSHealth properties file from the packaged zip bundle and tweak to meet your environment needs. Copy this file to the newly created ANSHOME directory and rename accordingly.
  3. Modify JBoss Run.bat with:
    • Create a JDBC_HOME to point to the drivers used to support the target RDBMS. Include in JBOSS classpath
    • If you using an external ANSHOME to contain your configuration files, create an -DANS.HOME System property.
    • Point the system property to your ANSHOME on your file system. Include ANS.HOME as a -D property in the JBoss startup command in the Run.bat script.
    • Update the JAVA_OPTIONS accordingly for your system environment.
  1. Use the Default JBoss configuration. Create an ANS directory under JBoss \default\deploy to house the production ePostRx Ear and War files. Copy these file to this directory.
  2. Modify the jbossmiminal.xml file to include the ’deploy/ans/’ as a new URL deployment scanning.
  3. Modify the following files to change Http port from 8080 to 80.
    • server.xml in default\deploy\jbossweb-tomcat50.sar
    • jboss-service.xml in default\deploy\http-invoker.sar\META-INF
  4. Copy the following Jars into the JBoss \Default\lib directory to support ePostRx:
    • Quartz - free scheduler (Ensure that QUARTZ is installed and the schema is installed).
    • iText - PDF generator
    • SwissSqlAPI (you will need to go to Swiss Sql to download the Swiss SQL One API jar);
    • Zql - SQL parser
    • Xalan - XSL transformer
    • Xerces - advanced XML parser
    • Apache commons jars (careful here, this may cause some conflicts)
    • Jasper Reports - report engine
    • Bouncy Castle JCE - crypto stuff
    • Cybersource Payment (ics) - credit card processor
    • XFire - web services
    • XStream - XML/Object mapping
    • JSTL/Standard
    • iBatis- DAO
  5. Because ePostRx uses Message Driven Beans(MDB), you will need to update the jbossmq-destinations-service.xml file in your configuration directory. Add the following entries for the following queues used by ePostRx:



 <mbean code="org.jboss.mq.server.jmx.Queue"


       <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>



 <mbean code="org.jboss.mq.server.jmx.Queue"


       <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>



 <mbean code="org.jboss.mq.server.jmx.Queue"


       <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>



 <mbean code="org.jboss.mq.server.jmx.Queue"


       <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>



<mbean code="org.jboss.mq.server.jmx.Queue"


       <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>



<mbean code="org.jboss.mq.server.jmx.Queue"


       <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>



<mbean code="org.jboss.mq.server.jmx.Queue"


       <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>



 <mbean code="org.jboss.mq.server.jmx.Queue"


       <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>



 <mbean code="org.jboss.mq.server.jmx.Queue"


       <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>



 <mbean code="org.jboss.mq.server.jmx.Queue"


       <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>



 <mbean code="org.jboss.mq.server.jmx.Queue"


       <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>



 <mbean code="org.jboss.mq.server.jmx.Queue"


       <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>



 <mbean code="org.jboss.mq.server.jmx.Queue"


       <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>



<mbean code="org.jboss.mq.server.jmx.Queue"


       <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>



<mbean code="org.jboss.mq.server.jmx.Queue"


       <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>


  8. There is an application wide JMS topic that needs to be set up as well. This is used to allow all ePostRx applications(B2B) to talk to each other. You will need to update the jbossmq-destinations-service.xml file in your configuration directory. Add the following entries for the following topics used by ePostRx: 

<!-- ANS TOPICS-->

 <mbean code="org.jboss.mq.server.jmx.Topic"


    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>


       9. You will need to add security to the JBoss Management Console otherwise anyone will be able to administer JBoss. Remove the JMX-Console web application from the configuration directory. In the Management /WebINF directory, update the user.properities file to add a new password. Also edit the web.xml and jboss-web.xml files to enable web application security.


     10. Start ANS.bat in the Jboss/bin directory

     11. If everything is ok, you should see an ePostRx banner that states - "***EPOSTRX Go - Transaction server started successfully***".


Installing/Running ePostRx Web Console on Tomcat 5.0

The ANSHealthConsole is packaged as a Web Application Resource (WAR). It is used to provide user access and management control of the ePostRx Transaction Server.

To install the management console, perform the following:

a) Build the WAR from the source bundle using UI_DEVELOPER.

b) Copy the ansConsoleHealth.war file to the webapps directory under your web server.

c) Ensure your Console Configuration settings are correct.

d) Create  an ANSHOME directory and update the startup scripts to include ANSHOME settings.

e) Please ensure your database drivers on defined on the system class path or part of the web server startup script.

 If everything is ok, you should see an ePostRx banner that states - "***EPOSTRX Go - Console started successfully***".


Logging into ePostRx

If you have gotten this far, congratulations! Now your ready to log into the application. Please enter the following url in your browser:

http://server:port(80 or 8080)/ansHealthConsole/htmljsp/system/login.jsp

At this point you should see the ePostRx login page. To login into ePostRx, enter the following:

Username ansdemo
Password ansdemo
Location PIN ansdemo

That's it!..


By now you should have a fairly good understanding of what ePostRx is and what you can do with it. If you're still rather confused, please visit the ePostRx community and let us know what can be improved.

PLEASE! - feel free to contribute to ePostRx in any way that interests you. Your feedback is always welcome - many of the current features and styles of ePostRx usage have come directly from users. There's always plenty of development work to be done, contact the project leaders if you are interested.


Miscellaneous Features

You feedback is important to us. ePostRx is constantly being evolved. ANSHealth would suggest you get involved with the ePostRx community and let us know what can be improved, add, remove.


Changes and Additions To This Document

Copyright 2002-2006 AdvanceNet Health Solutions Inc.