Double check prescription.js, should URL be updated in POST call for purchaseOrder

Description

related pull request:
https://github.com/Raxa/Raxa-JSS/pull/258/files#r1989232

notes from src/pharmacy/app/controller/prescription.js line 1604:

see 'RaxaEmr.Pharmacy.model.PurchaseOrder'
"
TODO: Should we be updating the URL here? as done in submitIssue
// If we are updating an existing purchase order, set url for that specific P.O.
"

Environment

None

Activity

Show:
John V Stoecker
November 6, 2012, 11:16 AM

No, URL should not be updated.

When I decrement batches, I could have a bunch of different inventories that do not belong to the same purchaseOrder. A prescription could be from drugInventory A, from purchaseOrder P1, and drugInventory B, from purchaseOrder P2

I wanted a way to easily decrement a bunch of inventories, and the back end already has a way to group inventories together – a purchaseOrder. Setting the name as 'Prescription' for a purchaseOrder is just for decrementing batches, it doesn't actually save any new purchase order in the back end. All it does is update the quantities of inventories.

However, this solution isn't 100% perfect – what we do eventually want, is some sort of purchase order type to save in the back end. Then we don't need to rely on the name for a purchase order to be a certain string: 'Issue', 'Requisition', 'Prescription', or 'Receipt'

Is part of refactoring but a lower priority, I believe. Would be interested to hear other's thoughts on
1. simple purchase orders that have different functions based on the name string (could be more error prone)
vs.
2. a more complex but robust way to differentiate purchase orders, such as a whole new resource in the back end for purchaseOrderType

John V Stoecker
November 8, 2012, 9:32 AM

(won't fix)

Assignee

John V Stoecker

Reporter

Nathan Leiby

Labels

None

Affects versions

Priority

Minor
Configure