Dispense Drug Button [D button in Clinical] should confirm delivery

Description

Dispensing of Drug - (D) button => confirm delivery if “D” option is present. Should respect the other above configuration of #BAH-853

 

This scenario is used in cases - when the provider prescribes a drug, and dispenses drug from his/her location. (In many rural settings, the doctor/provider will dispense the drug right after the consultation). By default, the drug order would create a quotation, which the user would have to confirm sale in Odoo. Instead of doing that, the provider clicks the “D” button of the medication in clinical module. This has following expectations

  1. The quotation needs to be automatically confirmed (sale confirmation)

  2. The delivery order resulting out of confirmation of sale - should be validated automatically.

    1. The stock location (source location of delivery) is identified by means of “Order Type - Shop mapping”. Meaning, if the provider location is “OPD-1”, then there must be a OrderType-Shop mapping for OPD-1.

    2. If no such mapping relevant to the “order location” is found - the stock location is identified by looking up any “Drug Order” type mapping in the “OrderType-Shop map”.

    3. Validation of delivery should respect the configuration settings in “sales / configruation/ settings”. mainly the 2 configurations below

      1. “Validate delivery when order confirmed” - validation when this configuration is enabled.

      2. If stock is not available at stock location (see b above for logic) - then validation of delivery with negative stock is allowed only if “Allow negative stock” is enabled.

  3. Invoice needs to be generated with default option and payment registered by “cash”

  4.  

 

 

Status

Assignee

Anand Patel

Reporter

Angshuman Sarkar

Labels

None

Units

None

PercentDone

None

DueTime

None

Clients

None

External issue ID

None

UAT Assignee

Swetha Bachugudem

Reviewer

None

Components

Sprint

Fix versions

Configure