Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: add barcode scan for invoice to stock movement #4145

Conversation

jniles
Copy link
Collaborator

@jniles jniles commented Jan 29, 2020

This PR implements stock exits via a barcode scan to link the patient and invoice. It was requested by our friends in Vanga.

In order to make the barcode scan have the same behavior as manually searching, I implemented an invoice-uuid property on the bh-find-invoice component to allow the invoice to be set externally. This allows external components to pass in an invoice-uuid and the component to look it up and render it in the same presentation as if the user typed in the reference.

Additionally, I also changed the server API for finding consumable items to take in either the invoiceUuid or the invoiceReference.

This is what it looks like in action:

cjnq4RhKQm

Implements the initial stock exit by scanning an invoice barcode.  In
addition to being able to attach a patient and/or an invoice, the user
is now able to scan an invoice barcode to look up the invoice in
question.

TODO - the barcode scan does not template in the values for each
inventory item like the bh-find-invoice component does.
Uses FilterParser on the /invoices/consumable API to allow us to search
via invoice_uuid as well as a human readable invoiceReference.
@kwilu kwilu added the size: XL label Jan 29, 2020
@jniles jniles force-pushed the feat-add-barcode-scan-for-invoice-to-stock-movement branch from c240178 to 19e7472 Compare January 29, 2020 07:57
Enhances the bhFindInvoice component to allow an external invoice uuid
to set the internal invoice.  This enhancement allows us to scan
external barcodes and use the component to display the result of that
scan.

Closes Third-Culture-Software#3949.
@jniles jniles force-pushed the feat-add-barcode-scan-for-invoice-to-stock-movement branch from 19e7472 to bd387ad Compare January 29, 2020 07:58
@jniles
Copy link
Collaborator Author

jniles commented Feb 3, 2020

bors r+

@bors
Copy link
Contributor

bors bot commented Feb 3, 2020

This PR was included in a batch with a merge conflict, it will be automatically retried

2 similar comments
@bors
Copy link
Contributor

bors bot commented Feb 3, 2020

This PR was included in a batch with a merge conflict, it will be automatically retried

@bors
Copy link
Contributor

bors bot commented Feb 3, 2020

This PR was included in a batch with a merge conflict, it will be automatically retried

bors bot added a commit that referenced this pull request Feb 3, 2020
4145: Feat: add barcode scan for invoice to stock movement r=jniles a=jniles

This PR implements stock exits via a barcode scan to link the patient and invoice.  It was requested by our friends in Vanga.

In order to make the barcode scan have the same behavior as manually searching, I implemented an `invoice-uuid` property on the `bh-find-invoice` component to allow the invoice to be set externally.  This allows external components to pass in an invoice-uuid and the component to look it up and render it in the same presentation as if the user typed in the reference.

Additionally, I also changed the server API for finding consumable items to take in either the `invoiceUuid` or the `invoiceReference`.

This is what it looks like in action:

![cjnq4RhKQm](https://user-images.githubusercontent.com/896472/73338337-a761cc80-4276-11ea-866d-ee470b5e5c72.gif)




Co-authored-by: Jonathan Niles <jonathanwniles@gmail.com>
@bors
Copy link
Contributor

bors bot commented Feb 3, 2020

@bors bors bot merged commit bd387ad into Third-Culture-Software:master Feb 3, 2020
@jniles jniles deleted the feat-add-barcode-scan-for-invoice-to-stock-movement branch February 3, 2020 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants