View on GitHub

PharmacyCOMv1

PaladinPOS Pharmacy Integration Service Definition

Download this project as a .zip file Download this project as a tar.gz file

ABOUT

Paladin Data Corporation is providing a way for pharmacy systems to communicate with the Paladin POS system. This service enables pharmacy systems to utilize the Paladin POS GUI front end while retaining their current system and business function.

Pharmacy systems just need to implement a simple SOAP-based webservice in order to allow Paladin POS to communicate with your system.

PharmacyCOMv1 provides a WSDL (web service definition language) as well as a base .NET Webservice as a starting point for implementing this service.

WEBSERVICE METHODS

The webservice should provide the following methods to Paladin POS:

GetRxItem Method

Allows Paladin POS to query the pharmacy system for a specific Rx number. During checkout, Paladin POS will call the pharmacy webservice GetRxItem in order to try to find the part number entered into the system. The pharmacy service implementation should respond back to paladin indicating that the item was invalid (not found) or valid (found).

GetRxItem Request

GetRxItem Response

If an Rx number is invalid, the webservice should return an RxItem containing the following values:

All other elements are ignored/missing

Example - RxItem Invalid

<?xml version="1.0" encoding="utf-8"?>
<RxItem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://services.Paladin POS.com/PaladinPharmacyCOMv1">
  <RxNumber>Test Invalid Rx Item 1</RxNumber>
  <RxValid>false</RxValid>
  <RxAmountDue>0</RxAmountDue>
  <RxMessages>
    <RxMessage Message="Item does not exist in the system!" Print="false" />
  </RxMessages>
  <RxItemFlags />
</RxItem>

If an Rx number is valid, the webservice should return an RxItem containing the following values:

Example - RxItem Valid

<?xml version="1.0" encoding="utf-8"?>
<RxItem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://services.Paladin POS.com/PaladinPharmacyCOMv1">
    <RxNumber>123456789</RxNumber>
    <RxValid>true</RxValid>
    <RxCustomerName>Test Customer</RxCustomerName>
    <RxPatientID>111222333444555666</RxPatientID>
    <RxAmountDue>50.00</RxAmountDue>
    <RxTaxable>true</RxTaxable>
    <RxMessages>
      <RxMessage Message="This item is a screen only message" Print="false" />
      <RxMessage Message="This message is for everyone!" Print="true" />
    </RxMessages>
    <RxItemFlags>
      <RxItemFlag Type="1" Message="HIPPA First Time Signature" Required="false" />
      <RxItemFlag Type="2" Message="No Safety Cap on Rx" Required="true" />
      <RxItemFlag Type="3" Message="Need Pharmacist Consult" Required="true" />
    </RxItemFlags>
</RxItem>

GetRxItems Method

This method functions the same as GetRxItem, but returns a list or array of RxItems back to Paladin POS from a single item number. This feature is enables support of “Bag Checkout”, where a single barcode represent multiple items, get scanned and all the contents of the “bag” will display on the POS invoice. This method was added in v1.06 and is only called when option “Enable GetRxItems (Bag Checkout)” is enabled within Paladin. When enabled, GeRxItems will always be called instead of the original GetRxItem method.

GetRxItems Request

GetRxItems Response

<?xml version="1.0" encoding="utf-8"?>
<ArrayOfRxItem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://services.paladinpos.com/PaladinPharmacyCOMv1">
  <RxItem>
    <RxNumber>test-1</RxNumber>
    <RxValid>true</RxValid>
    <RxCustomerName>Test Customer</RxCustomerName>
    <RxPatientID>111222333444555666</RxPatientID>
    <RxCustomerRegAddress1>321 Bogus Ave.</RxCustomerRegAddress1>
    <RxCustomerRegCity>HomeTown</RxCustomerRegCity>
    <RxCustomerRegState>OK</RxCustomerRegState>
    <RxCustomerRegZIP>34567</RxCustomerRegZIP>
    <RxAmountDue>44.44</RxAmountDue>
    <RxTaxable>true</RxTaxable>
    <RxMessages>
      <RxMessage Message="This item is a screen only message" Print="false"/>
      <RxMessage Message="This message is for everyone!" Print="true"/>
    </RxMessages>
    <RxItemFlags>
      <RxItemFlag Type="1" Message="HIPPA First Time Signature" Required="false"/>
      <RxItemFlag Type="2" Message="No Safety Cap on Rx" Required="true"/>
      <RxItemFlag Type="3" Message="Need Pharmacist Consult" Required="true"/>
    </RxItemFlags>
  </RxItem>
  <RxItem>
    <RxNumber>test-1-2</RxNumber>
    <RxValid>true</RxValid>
    <RxCustomerName>Test Customer</RxCustomerName>
    <RxPatientID>111222333444555666</RxPatientID>
    <RxCustomerRegAddress1>321 Bogus Ave.</RxCustomerRegAddress1>
    <RxCustomerRegCity>HomeTown</RxCustomerRegCity>
    <RxCustomerRegState>OK</RxCustomerRegState>
    <RxCustomerRegZIP>34567</RxCustomerRegZIP>
    <RxAmountDue>44.44</RxAmountDue>
    <RxTaxable>true</RxTaxable>
    <RxMessages>
      <RxMessage Message="This item is a screen only message" Print="false"/>
      <RxMessage Message="This message is for everyone!" Print="true"/>
    </RxMessages>
    <RxItemFlags>
      <RxItemFlag Type="1" Message="HIPPA First Time Signature" Required="false"/>
      <RxItemFlag Type="2" Message="No Safety Cap on Rx" Required="true"/>
      <RxItemFlag Type="3" Message="Need Pharmacist Consult" Required="true"/>
    </RxItemFlags>
  </RxItem>
</ArrayOfRxItem>

SaveRxInvoice Method

When an invoice is completed in Paladin POS that contains RxItems, Paladin POS will return an RxInvoice containing basic invoice details as well as all of the RxItems that were sold as part of the transaction. A RxInvoice contains the following values:

Example – RxInvoice

<?xml version="1.0" encoding="utf-8"?>
<RxInvoice xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://services.Paladin POS.com/PaladinPharmacyCOMv1">
  <RxInvoiceNumber>9201923</RxInvoiceNumber>
  <RxInvoiceDate>2008-03-03T10:17:33.578125-08:00</RxInvoiceDate>
  <RxSubTotal>125.99</RxSubTotal>
  <RxTaxTotal>7.24</RxTaxTotal>
  <RxTotal>133.23</RxTotal>
  <RxItems>
    <RxItem>
      <RxNumber>TEST RX NUMBER</RxNumber>
      <RxValid>true</RxValid>
      <RxCustomerName>Test Customer 1</RxCustomerName>
      <RxAmountDue>50.00</RxAmountDue>
      <RxTaxable>false</RxTaxable>
      <RxMessages />
      <RxItemFlags />
    </RxItem>
    <RxItem>
      <RxNumber>OTHER RX NUMBER</RxNumber>
      <RxValid>true</RxValid>
      <RxCustomerName>Test Customer 1</RxCustomerName>
      <RxAmountDue>50.00</RxAmountDue>
      <RxTaxable>false</RxTaxable>
      <RxMessages />
      <RxItemFlags />
    </RxItem>
  </RxItems>
  <RxPayments>
    <RxPayment Type="1" Amount="20.25" Message="Cash" />
  </RxPayments>
  <RxItemFlagResults>
    <RxItemFlagResult CustomerName="Test Customer 1" Type="1" Accepted="true">
      <Signature>/9j/4AAQSkZJRgigD/9k=</Signature>
    </RxItemFlagResult>
    <RxItemFlagResult CustomerName="Test Customer 1" Type="2" Accepted="true">
      <Signature>/9j/4AAQSkZJRgABQB//Z</Signature>
    </RxItemFlagResult>
    <RxItemFlagResult CustomerName="Test Customer 1" Type="3" Accepted="true">
      <Signature>/9j/KKAKKKACiiigD/9k=</Signature>
    </RxItemFlagResult>
  </RxItemFlagResults>
</RxInvoice>

Signature values shortened for example

GetAvailableCredit Method

Note: Added v1.03. Method is only called when option “Enable Customer Available Credit” is enabled within Paladin POS. This option disables AR in Paladin POS to be managed solely by the pharmacy system.

When an invoice customer is changed within the system, a request for that customer’s available credit will be made. The response from the pharmacy system will determine if a customer can charge to their store credit account maintained by the pharmacy system.

GetAvailableCredit Request

When enabled, Paladin POS will call GetAvailableCredit on pharmacy system using the customer’s pharmacy system id.

Example - GetAvailableCredit Request

<GetAvailableCredit xmlns="http://services.paladinpos.com/PaladinPharmacyCOMv1"> 
  <customerId>111222333444555666</customerId> 
</GetAvailableCredit>

GetAvailableCredit Response

The pharmacy system should return a AvailableCreditResponse message back to Paladin POS. The response from the pharmacy should specify if the customer lookup was successful and/or if the customer has any credit to allow charging locally. As of version 1.05, the available credit response also returns the account balance to allow paladin to display current account information and accept payment on customer accounts on behalf of the pharmacy system.

The AvailableCreditResponse message contains:

Example – AvailableCreditResponse Invalid

<AvailableCreditResponse> 
  <CustomerId>111222333444555666</CustomerId> 
  <IsValid>false</IsValid> 
  <Message>Customer not found</Message> 
  <AvailableCredit>0</AvailableCredit> 
  <AccountBalance>0</AccountBalance> 
</AvailableCreditResponse> 

Example – AvailableCreditResponse Valid

<AvailableCreditResponse> 
  <CustomerId>111222333444555666</CustomerId> 
  <IsValid>true</IsValid> 
  <Message>success</Message> 
  <AvailableCredit>213.35</AvailableCredit> 
  <AccountBalance>100.00</AccountBalance> 
</AvailableCreditResponse> 

SaveInvoice Method

**_Note: Added v1.03. This method is only called when option “Enable Send Full Invoice” is enabled within Paladin. This options disables PaladinPOS calls to SaveRxInvoice, and sends all invoices processed be the pharmacy system.

When an invoice is processed by Paladin POS, the entire invoice will be sent to the Pharmacy System. This should only be used if the pharmacy system is used as the primary system for AR.

An Invoice contains the following fields:

Example – SaveInvoice Request

<?xml version="1.0" encoding="utf-8"?>
<SaveInvoice xmlns="http://services.paladinpos.com/PaladinPharmacyCOMv1">
  <invoice>
    <Id>28841</Id>
    <Deleted>false</Deleted>
    <Number>28841</Number>
    <Date>2013-11-22T13:16:51.384</Date>
    <AccountNumber>2332</AccountNumber>
    <AccountName>Test Customer</AccountName>
    <PharmacyAccountNumber>111222333444555666</PharmacyAccountNumber>
    <AccountTracker>0</AccountTracker>
    <TerminalNumber>4</TerminalNumber>
    <EmployeeNumber>1</EmployeeNumber>
    <PurchaseOrderNumber />
    <Total>47.77</Total>
    <Profit>44.44</Profit>
    <PromptPaymentDiscount>0</PromptPaymentDiscount>
    <GlobalTax>true</GlobalTax>
    <GlobalNet>false</GlobalNet>
    <GlobalDefective>false</GlobalDefective>
    <DefaultTaxOverride>false</DefaultTaxOverride>
    <InvoiceType>0</InvoiceType>
    <Signature>R0lGODlhkAGAAPcAAAAAAAAAMwAAZgAAmQAAzAAA/TYMkfFMWEQVByJXc7UqEpvdIzemlvlbCMpSxhExAAOw==</Signature>
    <FlexTotal xsi:nil="true" />
    <StoreId xsi:nil="true" />
    <CustomerRewardNumber>111222333444555666</CustomerRewardNumber>
    <Categories xsi:nil="true" />
    <InvoiceItems>
      <InvoiceItem>
        <InvoiceId>28841</InvoiceId>
        <LineNumber>1</LineNumber>
        <InventoryId>-2147483648</InventoryId>
        <Date>2013-11-22T13:16:51.384</Date>
        <PartNumber>123456</PartNumber>
        <Description>Pharmacy Item 123456</Description>
        <PrimaryNumber />
        <DepartmentId>10020</DepartmentId>
        <QuantitySold>1</QuantitySold>
        <ReorderQuantity>0</ReorderQuantity>
        <RetailPrice>44.44</RetailPrice>
        <SellPrice>44.44</SellPrice>
        <SoldPrice>44.44</SoldPrice>
        <SellThreshold>0</SellThreshold>
        <Taxable>true</Taxable>
        <Net>false</Net>
        <Defective>false</Defective>
        <LineExt>44.44</LineExt>
        <PromptPaymentDiscount>0</PromptPaymentDiscount>
        <Profit>44.44</Profit>
        <CostPerUnit>0</CostPerUnit>
        <CostLineExt>0</CostLineExt>
        <PriceType xsi:nil="true" />
        <PricingPlanId>0</PricingPlanId>
        <SaleId>0</SaleId>
        <SupplierId1>-1</SupplierId1>
        <SupplierId2>-1</SupplierId2>
        <ClassId1>-1</ClassId1>
        <SubclassId1>-1</SubclassId1>
        <ClassId2>-1</ClassId2>
        <SubclassId2>-1</SubclassId2>
        <ClassId3>-1</ClassId3>
        <SubclassId3>-1</SubclassId3>
        <FlexItem>true</FlexItem>
        <StoreId xsi:nil="true" />
        <Categories xsi:nil="true" />
        <RxItem>true</RxItem>
      </InvoiceItem>
    </InvoiceItems>
    <InvoiceText>
      <InvoiceText>
        <InvoiceId>28841</InvoiceId>
        <LineNumber>2</LineNumber>
        <Value>This message is for everyone!</Value>
        <Categories xsi:nil="true" />
      </InvoiceText>
    </InvoiceText>
    <InvoicePayments>
      <InvoicePayment>
        <InvoiceId>28841</InvoiceId>
        <LineNumber>3</LineNumber>
        <Date>2013-11-22T13:16:51.384</Date>
        <Type>2</Type>
        <Amount>47.77</Amount>
        <Data>&lt;Charge&gt;
&lt;AccountNumber&gt;2332&lt;/AccountNumber&gt;
&lt;Name /&gt;
&lt;Memo /&gt;
&lt;/Charge&gt;</Data>
        <SaleId xsi:nil="true" />
        <Categories xsi:nil="true" />
      </InvoicePayment>
    </InvoicePayments>
    <InvoiceTaxes>
      <InvoiceTax>
        <Id>83878</Id>
        <InvoiceId>28841</InvoiceId>
        <Name>Florida Sales Tax</Name>
        <Type>1</Type>
        <Rate>7.5</Rate>
        <Amount>3.33</Amount>
        <Categories xsi:nil="true" />
      </InvoiceTax>
      <InvoiceTax>
        <Id>83879</Id>
        <InvoiceId>28841</InvoiceId>
        <Name>None</Name>
        <Type>2</Type>
        <Rate>0</Rate>
        <Amount>0</Amount>
        <Categories xsi:nil="true" />
      </InvoiceTax>
      <InvoiceTax>
        <Id>83880</Id>
        <InvoiceId>28841</InvoiceId>
        <Name>None</Name>
        <Type>3</Type>
        <Rate>0</Rate>
        <Amount>0</Amount>
        <Categories xsi:nil="true" />
      </InvoiceTax>
    </InvoiceTaxes>
    <InvoiceRxItemFlags>
      <InvoiceRxItemFlag>
        <CustomerId>111222333444555666</CustomerId>
        <CustomerName>Test Customer</CustomerName>
        <Type>1</Type>
        <Accepted>true</Accepted>
        <Signature>R0lGODlhkAGAAPcAAAAAAAAAMwAAZgAAmQAAzAAA/lbCMpSxhExAAOw==</Signature>
      </InvoiceRxItemFlag>
    </InvoiceRxItemFlags>
  </invoice>
</SaveInvoice>

Signature values shortened for example