iPharma

iPharma solution

This module is the foundation of the iPharma solution for pharmacies and pharmaceutical distribution. It enables:

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:

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:

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:

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.

  1. Open the Document Exchange Profiles and create (or select) a profile with Exchange Format = iPharma Client.
  2. 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.

EDI DAFNE®

The module integrates Business Central with DAFNE®, the EDI platform of the pharmaceutical industry. Two protocols are supported:

  1. Open Document Exchange Profiles and create a profile with Exchange Format and Exchange Transport set to Dafne.
  2. 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.
  1. Open the purchase order (or select one or more in the list).
  2. 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.

  1. Open the Purchase Orders list.
  2. 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.

iPharma DB

The module connects Business Central to the iPharma pharmaceutical database. It lets you:

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).

  1. Type in the Search field: the list is refreshed with the products found.
  2. For each product you see: Item No. (if the product already exists as an item), AIC Code, Description, Product Type, Public Price.
  3. 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):

Through a Job Queue entry with parameter UPDATE, the system:

  1. asks the database which items with an AIC Code changed since Last Item Update and re-imports them;
  2. 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;
  3. 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:

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.

  1. Open the Purchase Order (or Transfer Order).
  2. Make sure the location (for transfers, the transfer-to location) is filled in and has a Purchase Note Nos. series.
  3. In the Purchase Note No. field, choose the assist button (…) and confirm Assign new purchase note number?.
  4. 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).

  1. From the Purchase Order or Transfer Order, in the report actions, choose Purchase Note.
  2. 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.

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.

  1. Open DPC Invoicing.
  2. Set filters on the shipments' Posting Date and Invoicing Rule.
  3. On the Options tab enter the invoices' Posting Date (required).
  4. 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.

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 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:

  1. adds up the Requested Quantity of the item's lines;
  2. calculates the net price the customer would get when ordering the total quantity;
  3. 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:

  1. Open the Document Exchange Profiles page.
  2. Create a new profile, select the iPharma Phone format and enable it.
  3. 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:

  1. Answer the call on your extension.
  2. In Call Center Sales Orders choose New Phone Order.
  3. The system reads the number of the caller currently connected to the user's extension and looks up the matching customer.
  4. If the customer is found, a new sales order is created for the customer and opened on the call center order page.

Possible messages:

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:

The customer is searched, considering only non-blocked customers, in this order:

  1. customer Phone No.;
  2. customer Mobile Phone No.;
  3. contact Phone No., tracing back to the customer linked to the contact's company;
  4. 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.

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:

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.
  1. From Health Tracking Entries choose Process Entries.

  2. Enter Warehouse Code, Starting Date and Ending Date.

  3. 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.

  4. Select an entry of the transmission to send.

  5. Choose Document Exchange and then Export Health Tracking.

  6. An XML file is sent, named with the warehouse code and the transmission number (6 digits).

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:

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.
  1. Open Document Exchange Profiles and create a profile with the IQVIA Export format, specifying the transport used to send the files.
  2. 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:

  1. Open the IQVIA Setup page.
  2. Choose the Manual Export action and confirm the Start manual export? question.

A progress window is shown during processing.

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.

  1. Open Document Exchange Profiles and create a profile with the Promofarma format.
  2. From the profile, open Setup: the Promofarma Setup page opens.
  3. 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:

  1. The list of enabled pharmacies is updated from the portal, starting from Last Customer Check.
  2. 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.
  3. 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.
  4. 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.
  5. 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 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.

  1. Set up a document exchange profile with the Assinde format and the desired transport.
  2. Open the Posted Return Shipment to send and make sure Assinde Parcel No. is filled in (it is mandatory).
  3. Start document exchange from the shipment and choose Export CSV for Assinde.
  4. 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 .CSV extension.

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:

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.