iPharma
- iPharma solution
- Inventory mandatory government information
- Client receiving data from store
- EDI DAFNE®
- iPharma DB
- Purchase Note "Buono di Acquisto"
- DPC
- FarmaClick®
- Phone System Integration
- Health Tracking
- IQVIA® Export
- Promofarma® Export
- Assinde
- NMVS
iPharma solution
This module is the foundation of the iPharma solution for pharmacies and pharmaceutical distribution. It enables:
- handling of the National Health Service (NHS) share in counter sales (Store);
- the AIC Code as an item identifier in the iWMS warehouse;
- the iPharma API interface for exchanging data with external systems.
The other iPharma modules (tracking, AIC handling on items, warehouse integrations) build on this foundation.
Open the Store Setup page, General tab. The following fields are available:
| Field | Description |
|---|---|
| Health Product Posting Group | General product posting group used for lines with a health amount. If filled in, item lines with a health amount are invoiced with this group, separately from other lines. |
| Health Amount Account No. | G/L account where the refund expected from the health service is posted. |
| Health Difference Account No. | G/L account where the difference (patient co-payment) for lines with a health amount is posted. |
Store document lines have a Health Amount field, showing the part of the price covered by the health service.
When Store documents are turned into invoices:
- Expected health refund: if a Health Amount Account No. is set, the health amount of item lines is removed from the item line and moved to a line for that G/L account, described as "Expected health refund". Lines are grouped by VAT group.
- Health difference amount: if a Health Difference Account No. is set, for lines with a health amount the line amount is reversed from the sales account (taken from the general posting setup) and posted to the difference account, described as "Health difference amount".
- VAT Shareout: if the store uses VAT Shareout, lines on the Health Amount Account No. are also included in the shareout.
Among the item identifiers available in iWMS there is the AIC Code value, which identifies medicines by their marketing authorization code. The system also converts the AIC code between the 9-digit numeric format and the compact 6-character (base 32) format used in medicine barcodes.
Among the generic APIs, iPharma API is available: the interface used by external systems of the iPharma solution (for example warehouses and logistics services) to exchange orders, shipments, returns, inventory and availability. The functions available depend on the iPharma modules that are enabled.
Inventory mandatory government information
The module adds to Business Central the information required by pharmaceutical regulations for inventory management and drug traceability:
- the AIC Code on items, carried automatically onto sales, purchase, transfer and warehouse documents;
- health tracking data (type and code) on customers, vendors, addresses, warehouses and stores;
- pharmaceutical settings on order types;
- item recognition by AIC Code in incoming electronic documents.
On the affected cards the new fields are grouped in a FastTab called Pharmaceutical.
On the Item Card page, the AIC Code field is right after No.; the Pharmaceutical FastTab holds the other data.
| Field | Description |
|---|---|
| AIC Code | Marketing authorization code (AIC) of the drug. It is also shown in item drop-down lists. |
| Substance | Active substance of the drug (read-only). |
| Minimum Reference Unit | Quantity of the product's minimum reference unit (e.g. tablets per pack). |
| Health Tracking Type | Type of health tracking applied to the item. |
| Unsealable Lots | Shows whether there are lots of the drug that cannot be sold (read-only). Clicking the value opens the list of lots for the item's AIC Code. |
The Health Tracking Type field is also on the Item Template Card: when an item is created from a template, the value is copied to the new item.
On the Customer Card and Vendor Card pages, Pharmaceutical FastTab:
| Field | Description |
|---|---|
| Health Tracking Type | Type of party for drug traceability purposes. |
| Health Tracking Code | Identification code of the party in the government traceability database. |
| Local Health Agency Code | Code of the local health agency (ASL). |
Health Tracking Type and Health Tracking Code are also available on customer Ship-to Addresses and vendor Order Addresses, to handle destinations with their own tracking codes.
On the Warehouse card, Pharmaceutical FastTab:
| Field | Description |
|---|---|
| Health Tracking Type | Type of site for drug traceability purposes. |
| Health Tracking Code | Identification code of the warehouse in the government database. |
| Health Manager | Name of the warehouse's health manager. |
| Health Manager Role | Role of the health manager. |
On the Store card, Pharmaceutical FastTab, the store's Health Tracking Type and Health Tracking Code are available. Store document lines also show the AIC Code and the amounts covered by the National Health Service (Health Amount and Health Discount Amount).
On the Order Type card, Pharmaceutical FastTab:
| Field | Description |
|---|---|
| Health Tracking Entry Type | Type of entry to report to drug traceability for documents of this order type. |
| Health Tracking | Whether documents of this type are always (Always) or never (Never) included in traceability; blank for standard behavior. |
The AIC Code is copied automatically from the item when it is entered on:
- sales and purchase lines (orders, returns, etc.);
- transfer lines;
- requisition worksheet lines;
- price list lines.
The code then flows to subsequent documents: warehouse receipts and shipments, picks and put-aways (including registered ones), purchase receipts and sales shipments, posted invoices and credit memos, transfer shipments and receipts. It is shown as a column in the related subpages and item journals, as well as in several item summaries and searches, so the drug can be identified at every step.
When importing electronic documents (e.g. purchase invoices), if a line carries an item identifier that matches the AIC Code of a non-blocked item, the item is recognized automatically with its base unit of measure.
In the document exchange unit of measure rules, the Use Minimum Reference Unit option is available to convert quantities based on the item's minimum reference unit.
Client receiving data from store
This module lets Business Central automatically receive from iPharma stores their sales, purchase, transfer, adjustment and physical inventory documents, as well as daily register closings. Data arrives through a document exchange profile with the iPharma Client format and is stored as Store Documents and Store Closings.
While receiving, the system recognizes or automatically creates the required master data (customers, vendors, locations, salespeople, payment methods) and, if configured, posts some document types immediately.
- Open the Document Exchange Profiles and create (or select) a profile with Exchange Format = iPharma Client.
- From the profile, open the setup: the iPharma Client Setup page linked to the profile is shown (it is created automatically if missing).
| Field | Description |
|---|---|
| Default Store Category | Store category proposed for stores handled by the profile. |
| Exchange Reference | Reference table used to convert iPharma codes (payment methods, internal vendor locations, vendors not to be invoiced). Required for purchase documents. |
| Automatic Purch. Rcpt. Posting | If enabled, purchase receipt documents are posted right after being received. |
| Automatic Purch. Shpt. Posting | If enabled, purchase shipment documents (returns to vendor) are posted immediately. |
| Automatic Transfer Posting | If enabled, transfers (shipment or receipt) are posted immediately. |
| Automatic Adjustment Posting | If enabled, inventory adjustments are posted immediately. |
| Field | Description |
|---|---|
| Store No. Prefix | Prefix for store numbers. |
| Salesperson No. Prefix | Prefix added to the code of automatically created salespeople/operators. |
| Location Code Prefix | Prefix added to the code of automatically created locations. |
| Payment Method Code Prefix | Prefix added to the code of automatically created payment methods. |
| Page | Field | Description |
|---|---|---|
| Store Card | iPharma ID | Store code in iPharma. |
| Location Card | iPharma ID | Code of the iPharma site linked to the location. |
| Salesperson/Purchaser Card | iPharma | Indicates the salesperson comes from iPharma. |
| Payment Methods | iPharma | Indicates the payment method comes from iPharma. |
- Company check: the VAT registration no. of the sending site must match the one in Company Information.
- Locations: the iPharma site is looked up via the iPharma ID field; if missing, a location (with optional prefix) linked to the store is created.
- Customers and vendors: looked up by VAT registration no. (and fiscal code for customers); if not found they are created applying the country's template, if any. Blocked customers or vendors raise an error.
- Transfers: a purchase whose vendor has the company's own VAT registration no. is handled as a transfer from the location defined in the exchange reference. Vendors not to be invoiced can also be defined in the exchange reference.
- Salespeople: recognized by fiscal code among iPharma salespeople, otherwise created with a code made of prefix, location and iPharma code.
- Payment methods: automatically created (with prefix) if missing and flagged as iPharma.
- Items: recognized by AIC code; service lines can be mapped to G/L accounts.
- Automatic posting: after reception, documents are posted according to the setup options, unless the store category has Prevent Posting enabled.
EDI DAFNE®
The module integrates Business Central with DAFNE®, the EDI platform of the pharmaceutical industry. Two protocols are supported:
- CONDAFNE: purchase document exchange with vendors. Purchase orders are transmitted to DAFNE, and response documents (order confirmations and delivery notes) are received and processed automatically, up to the creation of the warehouse receipt.
- DAFNEFMD: connection to the medicine verification service (Falsified Medicines Directive), with verify, dispense, undo dispense and destroy operations on packs.
- Open Document Exchange Profiles and create a profile with Exchange Format and Exchange Transport set to Dafne.
- From the profile, open the transport setup: the Dafne Setup page linked to the profile opens.
| Field | Description |
|---|---|
| Profile Code | Document exchange profile the setup belongs to (read-only). |
| Protocol | CONDAFNE or DAFNEFMD. The relevant fields are shown depending on the protocol. |
| Web Endpoint | Service address. The assist button (…) proposes the standard address of the selected protocol. |
| Field | Description |
|---|---|
| Username | User for the DAFNE service. |
| Password | Access password (masked). |
| Company Name | Company name at DAFNE. |
| Company ID | Company identifier on DAFNE, included in transmitted orders. Required to send orders. |
| Archive Path | Folder where all sent and received files are archived. Required. |
| Search Orders by Outstanding Lines | When enabled, if a received document does not refer to an existing order, the order is searched among the vendor's outstanding lines. When disabled, a document without a valid order is reported as an error. |
| Field | Description |
|---|---|
| API Key | Service access key. |
| API Secret | Secret associated with the key (masked). |
| Channel Key | Communication channel key. |
| Warehouse Filter | Filter of the warehouses handled by the service. |
Section to manually test the verification service operations on a single pack.
| Field | Description |
|---|---|
| Location Code | Location for the operation. |
| Product Code Scheme | Product code scheme (e.g. GTIN). |
| Product Code | Product code. |
| Serial Number | Pack serial number. |
| Batch ID | Pack batch. |
| Expiration Date | Pack expiration date. |
| Transaction ID | Transaction identifier returned by the last operation (read-only). |
| Action | Description |
|---|---|
| CONDAFNE › Manual Import | Uploads an EDI file from your computer and processes it as if it had been received from DAFNE. |
| DAFNEFMD › Verify | Verifies the status of the pack entered in the test section. |
| DAFNEFMD › Dispense | Records the pack as dispensed. |
| DAFNEFMD › Undo Dispense | Reverts a previous dispense. |
| DAFNEFMD › Destroy | Records the pack as destroyed. |
| DAFNEFMD › Get Result | Retrieves the outcome of the last transaction and displays it (status and message). |
| Where | Field | Description |
|---|---|---|
| Location Card | Dafne ID | Location code on DAFNE; sent in orders as the delivery destination and used to recognize the location in received documents. |
| Purchases Sources (header and lines per location) | Dafne ID | Vendor/source code on DAFNE. The value on the location line takes precedence over the header. |
The VAT Registration No. in Company Information and on the purchase order are also required, both with the country prefix (e.g. IT...).
The Purchase Order page (General tab) and the Purchase Orders list show the Dafne Status field (read-only):
| Value | Meaning |
|---|---|
| (blank) | Order not yet transmitted. |
| Transmitted | Order sent to DAFNE. |
| Confirmed | Vendor order confirmation received. |
| Shipped | Delivery note received; the warehouse receipt has been created. |
- Open the purchase order (or select one or more in the list).
- Run the document exchange processing and choose Send order via Dafne ().
The order must have an order date, purchases source, location code and VAT registration no., and the Dafne Status must be blank. Item lines with an AIC code are transmitted, and comment lines are sent as notes. The sent file is saved in the archive path and the status becomes Transmitted.
- Open the Purchase Orders list.
- Run the document exchange processing and choose Receive documents from Dafne ().
All available documents are downloaded, archived and processed; at the end the number of confirmed orders and created warehouse receipts is shown. Alternatively, a single file can be loaded with Manual Import from the Dafne Setup.
- Files already received: if a file with the same name already exists in the archive, it is skipped with a warning.
- Order confirmation: the order status becomes Confirmed and the line quantities are adjusted to what the vendor confirmed.
- Delivery note: a warehouse receipt is created for the order location (which must require receipt), with the vendor as sender, the delivery note date and number, the receipt bin if applicable, the quantities to receive and the tracking data (lots/expiration dates) from the note. The order status becomes Shipped.
- Closing outstanding quantities: depending on the Close Outstanding Quantity setting of the purchases source (or its location line), the remaining quantities of the shipped lines, or of all order lines, are closed. Without this setting, lines are adjusted only when the shipped quantity exceeds the outstanding quantity.
- All operations and any errors (order, vendor, location or item not found) are recorded in the document exchange log.
iPharma DB
The module connects Business Central to the iPharma pharmaceutical database. It lets you:
- search products in the database and view their details, image and lot information;
- import a product as a new item, automatically choosing the item template based on configurable rules;
- automatically keep description, public price and other data of existing items up to date;
- view database data directly from item cards and lists, item search, summaries and demand replenishment.
Items are linked to database products through the item's AIC Code.
Search for the iPharma DB Setup page.
| Field | Description |
|---|---|
| API Endpoint | Address of the iPharma database service. |
| Authentication Token | Access token for the service. It is stored securely and shown masked. |
| Last Item Update | Date and time of the last item update from the database. It must be filled in before the first automatic update and is then maintained by the system. |
| Last Price Update | Date of the last public price update. It must be filled in before the first automatic update and is then maintained by the system. |
From the Item Template card, use the Pharmaceutical DB Rules action to define when a product imported from the database must be created with that template.
| Field | Description |
|---|---|
| Rule Group | Groups the rules: a group is satisfied only if all its rules are satisfied. |
| Property | Code of the database property to check (the same code shown in the database detail page). |
| Value Filter | Filter applied to the property value (e.g. X, A*, >10). Text comparison is case-insensitive. |
| Value Type | Text or Decimal: how the property value is interpreted. |
During import, the template whose satisfied rule group contains the highest number of rules is chosen. If no template applies, the import stops with the message "No item template found for ...". Deleting an item template also deletes its rules.
On the Item Card, in the Inventory section, the read-only Pharmaceutical DB Rule Group field shows the rule group associated with the item.
The Item Price Group page provides two options that limit database updates for the items in the group:
| Field | Description |
|---|---|
| Prevent Price Update from DB | When enabled, the public price of the group's items is not updated from the database (except when the item is created). |
| Prevent Description Update from DB | When enabled, the description of the group's items is not updated from the database (except when the item is created). |
Open the Pharmaceutical DB Search page (directly, or from the Item Search page with the Pharmaceutical DB search action, which carries over the text already typed).
- Type in the Search field: the list is refreshed with the products found.
- For each product you see: Item No. (if the product already exists as an item), AIC Code, Description, Product Type, Public Price.
- The side panes show the product Image and its main Details.
Available actions:
| Action | Effect |
|---|---|
| Import | If the product does not exist yet, asks for confirmation ("Import item ...?") and creates it as an item; then opens the item card. If it already exists, opens the card directly. |
| Same Substance | Replaces the list with products that have the same active substance as the selected product. |
| Details | Opens the Pharmaceutical DB Details page. |
| Lots | Opens the Pharmaceutical DB Lots page. |
Shows all database information for the product, grouped by section (in bold) with the Type and Value columns.
Shows the product's lot information for each Progressive: Mandatory flag, saleability dates ("Saleable until" / "Saleable after"), Unsaleable lots, Saleable lots and Notes. If there is none, "No lot information" is shown.
| Page | Feature |
|---|---|
| Item Card, Item List | Drug DB action (Navigate): opens the database detail for the item. |
| Item Search | Image pane; Pharmaceutical DB search and DB Detail actions. |
| Item Summary | Image pane; Pharmaceutical DB action in the Pharmaceutical group. |
| Item Inventory Summary | Image pane; Pharmaceutical DB action. |
| Demand Replenishment | AIC Code column, Image pane, Drug DB action. The AIC code is also carried over to the generated requisition lines. |
| Get shipment lines to reverse (sales returns) | Product Image pane. |
When a product is imported (or updated):
- if the item does not exist, it is created from the template selected by the rules, with its AIC Code;
- Description and Public Price are updated (respecting the item price group options); the price used is the one valid at today's date;
- Minimum Reference Unit, Unsealable Lots (enabled if the database reports lot information) and Manufacturer Code are updated (the manufacturer is created if missing);
- the product barcodes are added as barcode item references, if not already present.
Through a Job Queue entry with parameter UPDATE, the system:
- asks the database which items with an AIC Code changed since Last Item Update and re-imports them;
- retrieves public price changes since Last Price Update and updates the items (except those in price groups with Prevent Price Update from DB), recording the change in the change log;
- updates the last update dates in the setup.
In sales documents, when an item number that does not exist is entered, the system also looks for an item with that AIC Code.
Purchase Note "Buono di Acquisto"
This feature manages the purchase note ("Buono di Acquisto"), the document required to move items subject to a register (for example controlled substances). It lets you:
- define, for each item ledger register, whether a purchase note is mandatory;
- assign a purchase note number from a number series defined per location;
- record purchase note number and date on purchase orders, sales orders and transfer orders;
- print the purchase note from purchase orders and transfer orders;
- carry the purchase note number and date to posted documents and to item ledger book entries.
On the Item Ledger Registers page the following field is available:
| Field | Description |
|---|---|
| Purchase Note Mandatory | When enabled, documents moving items linked to this register require a purchase note number. It can be changed only while the register has no entries. |
On the Location Card, Number Series group:
| Field | Description |
|---|---|
| Purchase Note Nos. | Number series used to assign purchase note numbers for the location. |
On the Warehouse card, the following data printed on the note is available:
| Field | Description |
|---|---|
| Controlled Substance Authorization | Number of the authorization to handle controlled substances. |
| Controlled Substance Auth. Date | Date of the authorization. |
The purchase and inventory report selection pages include the usages Purchase Note and Purchase Note (transfer), used to choose the report to print.
The General FastTab of the Purchase Order, Sales Order and Transfer Order contains:
| Field | Description |
|---|---|
| Purchase Note No. | Purchase note number. On purchase and transfer orders the assist button (…) assigns a new number. Clearing the field also clears the date. |
| Purchase Note Date | Purchase note date. It can be entered only when the number is filled in. |
Number and date are carried to posted purchase receipts, invoices and credit memos, return shipments, sales shipments, return receipts, posted transfer shipments and receipts, and to Item Ledger Book Entries.
- Open the Purchase Order (or Transfer Order).
- Make sure the location (for transfers, the transfer-to location) is filled in and has a Purchase Note Nos. series.
- In the Purchase Note No. field, choose the assist button (…) and confirm Assign new purchase note number?.
- The next number in the series is assigned and Purchase Note Date is set to the work date.
On the Sales Order number and date are entered manually (for example those of the note received from the customer).
- From the Purchase Order or Transfer Order, in the report actions, choose Purchase Note.
- On the request page enter the No. copies (default 4) and print.
For purchase orders, printing requires the order to be released and the repository, note number and date to be filled in; the note shows company data, location address, warehouse data (including controlled substance authorization and health manager), vendor repository, items and quantities.
- Line check: when a quantity is entered on an item line of a purchase, sales or transfer order (or the note number on the header is changed):
- if the item belongs to a register with mandatory purchase note, the note number must be filled in;
- if the document has a note number, all items must belong to a register with mandatory purchase note.
- Document release: if the note number is filled in, the date must be filled in too.
- Sales orders: on release, the system checks that the same note number, for the same customer and in the same year, is not already used by another sales order or by a shipment for another order.
- Demand replenishment: suggestion lines for items with mandatory purchase note are flagged and grouped separately; before creating orders a confirmation is requested (A new purchase note will be issued. Continue?) and a new note number is automatically assigned to the generated purchase orders.
DPC
The module manages DPC (Distribution on behalf of the health service) of medicines: sales, purchase and return orders related to DPC, with order number and prescription number on lines, per-location setup and summary invoicing of DPC shipments.
The DPC Setup page is opened from the setup of the iPharma DPC document exchange profile. One setup is defined per location.
| Field | Description |
|---|---|
| Location Code | Warehouse handling DPC. When selected, the description is filled in with the location name. |
| Description | Description of the setup. |
| Local Health Agency Code | Code of the reference local health agency. |
| Enabled | Whether the setup is active. Kept in sync automatically when the linked document exchange profile is enabled or disabled. |
| Field | Description |
|---|---|
| FTP Server | FTP server address used to exchange DPC data. |
| FTP Username | FTP login user. |
| FTP Password | FTP login password. |
| Field | Description |
|---|---|
| Sales Order Type | Order type used for DPC sales orders. |
| Sales Order Type (procured) | Order type used for DPC sales orders of procured goods. |
| Stock Order Type | Order type used for DPC stock orders. |
| Default Sales Price (LCY) | Sales price proposed for DPC lines. |
| Default Payment Terms Code | Proposed payment terms. |
| Gen. Prod. Posting Group | General product posting group to use. |
| VAT Prod. Posting Group | VAT product posting group to use. |
| Summary Description | Description of the summary lines on the invoice. |
| Summary Account No. | G/L account used for summary lines on DPC invoices (required for invoicing). |
| Shipment Note | Note printed on DPC shipments. |
| Field | Description |
|---|---|
| Adj. Template Name | Item journal template used for adjustments. |
| Adj. Batch Name | Item journal batch used for adjustments. |
| Adj. Bin Code | Location bin used for adjustments. |
| Unsell. Bin Code | Bin where unsellable goods are moved. |
| Automatic Adj. Posting | If enabled, adjustments are posted automatically. |
On the Order Type card, Pharmaceutical group:
| Field | Description |
|---|---|
| DPC Order | The order type is dedicated to DPC. Only these order types can be selected in DPC Setup. |
| DPC Prescription No. | DPC prescription number linked to the order type. |
On the Customer Card:
| Field | Description |
|---|---|
| DPC Enabled | The customer (pharmacy) takes part in DPC. |
| DPC Bill-to No. | Customer to invoice for DPC supplies. |
| DPC Location Code | Reference DPC location for the customer. |
| Prevent Combine Pick (DPC) | Prevents DPC picks from being combined with other orders. |
| Print Shipping Doc. (DPC) | Prints the shipping document for DPC deliveries. |
The Ship-to Address page has a DPC Enabled field to enable DPC on a single address.
Lines of sales orders, sales return orders, purchase orders and posted sales shipments show:
| Field | Description |
|---|---|
| DPC Order No. | DPC order the line refers to. |
| DPC Prescription No. | DPC prescription number. |
These values are carried over to posted documents (shipments, receipts, invoices, credit memos, returns).
The DPC Invoicing batch job (available through search) creates sales invoices for DPC shipments not yet invoiced.
- Open DPC Invoicing.
- Set filters on the shipments' Posting Date and Invoicing Rule.
- On the Options tab enter the invoices' Posting Date (required).
- Confirm.
One invoice is created for each bill-to customer and invoicing rule, with the given posting date. For each shipment the invoice contains a reference to the shipment followed by lines on the summary account of the location's DPC Setup, grouped by unit price with the total shipped quantity. When the invoice is posted, the shipments are flagged as DPC Invoiced and cannot be invoiced again.
- Customer blocking checks are skipped for DPC orders, when entering the customer, when posting and when registering picks.
- DPC orders and shipments are excluded from customer credit limit checks and entries.
- DPC lines are excluded from price recalculation during warehouse shipment.
- The Enabled status of DPC Setup follows that of the linked document exchange profile.
FarmaClick®
The module integrates Business Central with the FarmaClick® ordering platform, used by pharmacies to send orders to the distributor and to check availability, credit limits and delivery documents. Data is exchanged automatically through the iPharma interface: users do not need to perform manual steps, and they find received orders and updated data in Business Central.
The module also adds automatic price recalculation for cumulative shipments.
| Function | Description |
|---|---|
| Stock availability | Provides, per location and item, the quantity in bins whose bin type is marked Include in Availability, together with quantities already committed by outstanding sales orders and transfer orders. |
| Order receipt | Receives orders sent by pharmacies and records them as sales orders or transfer orders (see below). |
| Delivery documents | Returns a customer's posted sales shipments (or transfer shipments), with lines, quantities, requested quantities and amounts. |
| Customer credit | Provides, for each customer with a Credit Limit (LCY) greater than zero, the limit and the available credit; the same limit is also reported for customers that have that customer as Bill-to Customer No.. If credit limit (plafond) management is active, the valid credit limits are sent as well. |
When an order arrives from FarmaClick®, Business Central creates the document automatically without showing confirmation messages. The item availability check and the credit limit check are skipped during creation.
If the order does not specify a transfer-to location, a Sales Order is created:
| Field | Description |
|---|---|
| Sell-to Customer No. | Customer specified in the order. |
| Order Type | Set if a sales order type exists whose EDI Code matches the type received. |
| Ship-to Code | Ship-to address specified in the order, if any. |
| External Document No. | Pharmacy order reference. |
Each line carries item, location, Shipping Line Code, any delivery warehouse and Delivery Line Code, quantity, Requested Quantity, unit price and line discount.
Automatic behaviour:
- if all lines use the same location, that location (with shipping line and delivery data) is also set on the header;
- the order is released automatically if it contains at least one item line with a quantity greater than zero.
If the order specifies a destination location, one or more Transfer Orders are created, one for each source location found in the lines. Blocked items are skipped. Orders with at least one line with a quantity are released automatically.
FarmaClick® can request a customer's deliveries by order number, by external document number (last 7 days), or by posting date and document number. If no date is given, shipments from the last 7 days are considered. For sales shipments, amounts exclude free-of-charge quantities; for transfers, amounts are calculated from the item unit cost.
When a Warehouse Shipment with Receiver Type Customer and Cumulative Shipment enabled is posted, for each item appearing on several order lines Business Central:
- adds up the Requested Quantity of the item's lines;
- calculates the net price the customer would get when ordering the total quantity;
- if that price is better than a line's price, updates Unit Price and Line Discount % on the sales order line.
This way the customer benefits from quantity-based pricing even when orders were sent separately.
Phone System Integration
The module connects Business Central to the phone system (PBX) through an external API service. It lets you:
- create a sales order for the customer currently calling your extension, recognized by phone number;
- view the list of missed calls and call the number back with one click;
- create a sales order directly from a customer's missed call.
- Open the Document Exchange Profiles page.
- Create a new profile, select the iPharma Phone format and enable it.
- Open the profile setup: the iPharma Phone Setup page opens.
General
| Field | Description |
|---|---|
| API Endpoint | Address of the API service that communicates with the PBX. |
| Authentication Token | Token used to authenticate with the API service. The value is masked. |
PBX
| Field | Description |
|---|---|
| PBX Protocol | Communication protocol with the PBX (AMI). |
| PBX Host | PBX address. |
| PBX Port | PBX connection port. |
| PBX User | User for PBX access. |
| PBX Password | Password for PBX access. The value is masked. |
| Base Number | Base number of the PBX. |
| Strip Prefix | Prefix placed before the dialed number when making an outgoing call (for example the outside line prefix). |
On the Business Central User Setup page, fill in for each user who uses the phone:
| Field | Description |
|---|---|
| Phone Profile | Document exchange profile with the iPharma Phone format to use for the user. |
| Phone Extension | PBX extension assigned to the user. |
Both fields are required to use the New Phone Order and Recall functions; the profile must be enabled.
The Call Center Sales Orders page provides the actions:
- New Phone Order (shortcut Ctrl+S);
- Missed Calls.
- Answer the call on your extension.
- In Call Center Sales Orders choose New Phone Order.
- The system reads the number of the caller currently connected to the user's extension and looks up the matching customer.
- If the customer is found, a new sales order is created for the customer and opened on the call center order page.
Possible messages:
- No incoming call for extension ...: there is no active call on the extension.
- No matching customer for ...: the caller's number does not match any customer.
Choose Missed Calls: the page collects missed calls from all enabled iPharma Phone profiles, sorted from the most recent.
| Field | Description |
|---|---|
| Phone No. | Number that called. |
| Customer No. | Customer recognized from the number, if found. |
| Customer Name | Name of the recognized customer. |
| Date/Time | Date and time of the missed call. |
| Missed Calls | Number of missed calls from that customer or number. |
Calls from the same customer (or, if the customer is not recognized, from the same number) are grouped in a single line.
Available actions:
- Recall: starts a call from your extension to the number on the line. The PBX first rings the user's extension and then dials the number.
- New Phone Order (Ctrl+S): if the line has a recognized customer, creates a new sales order for that customer and opens it on the call center order page.
The customer is searched, considering only non-blocked customers, in this order:
- customer Phone No.;
- customer Mobile Phone No.;
- contact Phone No., tracing back to the customer linked to the contact's company;
- contact Mobile Phone No., with the same criterion.
The number must exactly match the one recorded.
Health Tracking
This feature generates drug health tracking entries from posted inventory movements (sales shipments, sales returns, transfer shipments and receipts) and exports them as XML files through Document Exchange, for transmission to the health tracking system.
Only items that have a health tracking type and an AIC Code are considered.
- Health Tracking Setup: general setup page.
- Health Tracking Entries: search for the page with Business Central search (History category).
For each document type you set the default entry type and whether the document must be tracked.
| Field | Description |
|---|---|
| Default Sales Entry Type | Entry type used for sales shipments when the order type does not specify one. |
| Track Sales | Always, Never or Optional (see below). |
| Default Sales Return Entry Type | Entry type used for sales returns. |
| Track Sales Return | Always, Never or Optional. |
| Default Purchase Return Entry Type | Entry type for purchase returns. |
| Track Purchase Return | Always, Never or Optional. |
| Default Transfer Shipment Entry Type | Entry type used for transfer shipments when the order type does not specify one. |
| Track Transfer Shipments | Always, Never or Optional. |
| Default Transfer Receipt Entry Type | Entry type used for transfer receipts. |
| Track Transfer Receipts | Always, Never or Optional. |
Option meaning:
-
Always: documents of that type are always tracked.
-
Never: documents of that type are never tracked.
-
Optional: the document is tracked unless its order type is set not to be tracked.
-
Warehouse: must have Health Tracking Code and Health Tracking Type (sender code and type). Only locations linked to the warehouse are processed.
-
Item: must have a health tracking type and an AIC Code.
-
Customer or ship-to address: for sales, they must have the recipient's tracking code and type; if the shipment uses a ship-to address, its data is used, otherwise the customer's.
-
Store: for transfers, the destination location (or origin location, for receipts) must be linked to a store with a tracking code and type.
-
Order type: can specify whether documents are tracked (Health Tracking) and a specific Health Tracking Entry Type, which takes priority over the setup default.
Read-only page listing the generated entries.
| Field | Description |
|---|---|
| Entry No. | Sequential entry number. |
| Warehouse Code | Source warehouse. |
| Source Tracking Code / Source Tracking Type | Tracking code and type of the sending warehouse. |
| Entry Type | Health tracking entry type. |
| Item Ledger Entry No. | Originating item ledger entry. |
| AIC Code | Item AIC code. |
| Description | Item description. |
| Product Type | Item health tracking type. |
| Quantity | Quantity moved (always positive). |
| Destination Tracking Code / Destination Tracking Type | Recipient tracking code and type. |
| Destination No. / Destination Name | Destination customer or location. |
| Customer Type, Customer Code, Billing Type, Billing Code | Additional customer and billing data (hidden by default). |
| Document No. | Originating posted document. |
| Posting Date / Posting Time | Posting date and time. |
| Transmission No. / Transmission Date | Number and date of the transmission in which the entry was generated. |
- Process Entries: opens the Process Health Tracking report.
- Document Exchange: on the selected entries, lets you choose Export Health Tracking, which sends the XML file of the transmission of the first selected entry.
-
From Health Tracking Entries choose Process Entries.
-
Enter Warehouse Code, Starting Date and Ending Date.
-
Confirm. Item ledger entries (excluding corrections) of the warehouse locations in the period are read and tracking entries are created with a new transmission number.
-
Select an entry of the transmission to send.
-
Choose Document Exchange and then Export Health Tracking.
-
An XML file is sent, named with the warehouse code and the transmission number (6 digits).
- An item ledger entry that has already been tracked is not processed again.
- Sales shipments with inbound quantity are treated as returns and use the sales return entry type.
- Through Document Exchange, automatic processing can be scheduled: for each warehouse with a tracking code, entries are generated day by day, from the day after the last entry up to yesterday, and every non-empty transmission is exported.
- If required data is missing (tracking codes, AIC Code, default entry types) processing stops with an error.
IQVIA® Export
This feature exports sales data of the selected locations to IQVIA® as fixed-length text files. For each location up to three files can be generated:
- Customers: domestic customers that received posted sales shipments from the location during the period;
- Items: non-blocked items sold from the location during the period, with AIC code, description, public price and bar code;
- Sales: quantities sold per item and customer (daily for the weekly export, period totals for the monthly export).
The files are sent through document exchange, using the transport configured in the profile.
On the Location Card, General FastTab, a new field is available:
| Field | Description |
|---|---|
| IQVIA Code | Code identifying the location at IQVIA. It is required for locations included in the export and is used in the file names and headers. |
- Open Document Exchange Profiles and create a profile with the IQVIA Export format, specifying the transport used to send the files.
- From the profile, open the format setup: the IQVIA Setup page linked to the profile opens.
| Field | Description |
|---|---|
| Profile Code | Document exchange profile the setup belongs to (not editable). |
| Location Filter | Locations to export (a filter can be entered). |
| Export Customers | If enabled, the customers file is generated. |
| Export Items | If enabled, the items file is generated. |
| Export Sales | If enabled, the sales file is generated. |
| Export Type | Weekly or Monthly: determines the exported period. |
| Last Export Date | End date of the last exported period. It is updated automatically; it can be changed to repeat an export. |
The export can run automatically through document exchange or manually:
- Open the IQVIA Setup page.
- Choose the Manual Export action and confirm the Start manual export? question.
A progress window is shown during processing.
- Exported period: with Weekly, the week before the current one is exported; with Monthly, the month before the current one.
- If the period has already been exported (end date not later than the Last Export Date), nothing is exported.
- Every location in the filter must have an IQVIA Code, otherwise the export stops with an error.
- Posted item sales entries of the location in the period are considered; returns are reported with the opposite sign of sales.
- The customers file includes only customers whose VAT registration number starts with the company's country/region code (set in Company Information, required).
- At the end, the files are sent with the profile's transport and the Last Export Date is updated with the end of the exported period.
Promofarma® Export
This feature automatically sends posted sales shipments to the Promofarma (Federfarma) e-DDT portal as electronic delivery notes. Only shipments for customers (pharmacies) enabled for the service, both in Business Central and on the Promofarma portal, are sent.
The integration is based on Document Exchange Profiles: you create a profile with the Promofarma format and configure its setup.
- Open Document Exchange Profiles and create a profile with the Promofarma format.
- From the profile, open Setup: the Promofarma Setup page opens.
- Fill in the fields described below.
| Field | Description |
|---|---|
| Profile Code | Document exchange profile the setup refers to (read-only). |
| Username | User name for the Promofarma e-DDT portal. |
| Password | Password for the portal (stored securely and shown masked). |
| Last Customer Check | Date of the last download of enabled pharmacies from the portal. Must be filled in: the next check starts from this date and automatically updates it to today. |
| Send Shipment From Date | Starting posting date of the shipments to send. Mandatory. |
| Shipment Date Delay | Date formula applied to today to determine the latest posting date of shipments to send (e.g. -1D to skip today's shipments). |
| Web Service Delay (sec.) | Pause, in seconds, between one upload and the next, to avoid overloading the portal. |
| Field | Description |
|---|---|
| Document No. | Number of a posted sales shipment to use with the Download e-DDT - Test action. |
| Action | Description |
|---|---|
| Reset Sales Shipment Status | Opens a filter on posted sales shipments; for the filtered shipments with Sent to Promofarma = Error, the status is cleared so they are sent again at the next run. |
| Clear Enabled Customers | After confirmation, clears the list of enabled pharmacies stored in Business Central. |
| Download Enabled Customers | Downloads the updated list of enabled pharmacies from the portal and saves it to a customers.json file. |
| Download e-DDT - Test | Generates the electronic delivery note (XML) for the shipment entered in Document No. and downloads it as shipment.xml, without sending it. |
The Customer Card includes these fields:
| Field | Description |
|---|---|
| Promofarma e-DDT Enabled | Indicates that the customer's shipments must be sent to Promofarma. |
| Promofarma e-DDT Since | Service activation date for the customer. Shipments from years before this date's year are not sent. |
The customer must also have the Health Tracking Code filled in, which is used to match the customer in the portal's list of enabled pharmacies.
Posted sales shipments have the Sent to Promofarma field, with these values:
| Value | Meaning |
|---|---|
| (blank) | Shipment not yet processed. |
| Yes | Shipment sent successfully. |
| No | Shipment processed but not sent because the customer was not enabled or there were no lines to send. |
| Error | Upload failed; the error details are recorded in the document exchange profile log. |
Shipments are sent when the document exchange profile is processed (manually or through the job queue). During processing:
- The list of enabled pharmacies is updated from the portal, starting from Last Customer Check.
- Shipments with blank Sent to Promofarma and a posting date between Send Shipment From Date and the date calculated with Shipment Date Delay are examined.
- A shipment is sent only if the bill-to customer:
- has Promofarma e-DDT Enabled turned on and Promofarma e-DDT Since filled in, with a year not later than the shipment's year;
- is enabled on the Promofarma portal for the shipment's year (via the Health Tracking Code);
- and the shipment contains lines with a quantity.
- When a customer is enabled, all of their shipments of the same year not yet sent (status blank or No) within the configured date range are sent.
- Each shipment is marked Yes if sent, Error if the upload fails (with a log entry), or No if it must not be sent.
The electronic delivery note includes sender, recipient, item lines and, where available, lot numbers and expiration dates.
Assinde
The module supports returns of pharmaceutical products through the Assinde service:
- on items it shows the Assinde information received from the pharmaceutical database;
- on purchase returns it lets you enter the Assinde parcel number;
- on posted return shipments it lets you export a CSV file with the return contents, sent to Assinde through document exchange.
On the Item Card, Pharmaceutical FastTab, the following read-only fields are available:
| Field | Description |
|---|---|
| Assinde | Assinde indication for the item, received from the pharmaceutical database. |
| Assinde Starting Date | Date from which the Assinde indication applies. |
The same fields are also shown in the Purchase Return Factbox, for the item on the selected return line.
When items are updated from the pharmaceutical database, the Assinde and Assinde Starting Date fields are updated automatically with the received values. The date is updated only when the database provides one.
On the Purchase Return Order page, Shipping and Payment FastTab:
| Field | Description |
|---|---|
| Assinde Parcel No. | Parcel number assigned by Assinde to the return. It is carried over to the posted return shipment. |
On the Posted Return Shipment page, Shipping FastTab, the Assinde Parcel No. field is shown. If it was not entered before posting, it can be entered or corrected with the Update Document action, which opens a window where the field can be edited.
The Assinde document exchange format generates the return file to send to Assinde.
- Set up a document exchange profile with the Assinde format and the desired transport.
- Open the Posted Return Shipment to send and make sure Assinde Parcel No. is filled in (it is mandatory).
- Start document exchange from the shipment and choose Export CSV for Assinde.
- The file is generated and sent through the profile's transport; the file name is the return shipment number (letters and digits only) with the
.CSVextension.
The semicolon-separated CSV file contains a header row and one row per returned lot, with these columns:
| Column | Content |
|---|---|
| NumeroCollo | Assinde parcel number of the return shipment. |
| AIC | AIC code of the item. |
| Nome | Description of the return line. |
| Lotto | Lot number. |
| Scadenza | Lot expiration date, in MM/YYYY format. |
| Quantita | Returned quantity (in base unit of measure). |
Notes:
- only item lines with a positive quantity are included, excluding correction lines, and only items that have an AIC code;
- if an item has no registered lots, a single row is exported with empty lot and expiration and with the item's total returned quantity.
NMVS
The module adds the data required to verify medicine packs through the National Medicines Verification System (NMVS), as required by the EU Falsified Medicines Directive. For each tracked pack you can record the product code and see the status returned by NMVS (active, supplied, destroyed or in error).
Communication with NMVS goes through the Dafne service (DAFNEFMD protocol).
The Warehouse Card contains the field:
| Field | Description |
|---|---|
| NMVS ID | Identifier of the warehouse in NMVS. It is sent with every verification request for locations linked to the warehouse and is required to communicate with the service. |
Item tracking lines (and the related registered lines) contain the following fields:
| Field | Description |
|---|---|
| Product Code Scheme | Product code scheme of the pack (for example GTIN). |
| Product Code | Product code of the pack, read from the unique identifier. |
| NMVS Status | Pack status returned by NMVS. |
| NMVS Message | Message returned by NMVS in case of error. |
| Value | Meaning |
|---|---|
| (blank) | The pack has not been sent to NMVS yet. |
| Pending | The request has been sent and the result is awaited. |
| Active | The pack is active in NMVS. |
| Supplied | The pack has been supplied (dispensed). |
| Destroyed | The pack has been destroyed. |
| Error | NMVS reported an error; details are shown in NMVS Message. |
- Sending packs: only lines with a blank NMVS Status and with Product Code Scheme, Product Code, serial number, lot number, expiration date and location filled in can be sent; all lines sent together must belong to the same location. After sending, the status becomes Pending.
- Retrieving results: once NMVS has processed the request, each pack is matched by product code, lot, serial number and expiration date and its NMVS Status is updated. On error the status becomes Error and NMVS Message is filled in.
- The warehouse linked to the lines' location must have the NMVS ID field filled in.