Documentation ¶
Overview ¶
* File: mainDB Description: Does the all of the work with the order database @author: Bryan Conn @date: 10/7/18
* File: userDB Description: Works with the userdb @author: Bryan Conn @date: 10/7/18
Index ¶
- func AddAudit(audit pkg.Audit) (bool, int)
- func AddDrug(acNdc string, acMonth string, acDay string, acYear string)
- func AddPrescription(prescription pkg.Prescription) (bool, int)
- func AddPurchase(purchase pkg.Purchase) (bool, int)
- func AddUser(acUsername string, acPassVal string)
- func DeleteOrder(anId int64)
- func FindNDC(acNdc string) (string, string, string, string, string, time.Time, float64, []pkg.Order)
- func GetDrug(acNdc string) pkg.Drug
- func GetDrugs(acName string) []pkg.DrugDB
- func GetOrder(anId int64) []pkg.Order
- func GetUsers() []pkg.User
- func NewCheck(acNdc string) bool
- func UpdateDrug(acSize string, acForm string, acItemNum string, acName string, acNdc string, ...)
- func UpdateOrder(acId string, acScript string, acQty string)
- func UpdateOrderNdc(acId string, acNdc string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddAudit ¶
*
- Function: AddAudit
- Description: Adds a audit type order to the orderdb
- @param audit The audit to add to the DB
func AddDrug ¶
*
- Function: AddDrug
- Description: Adds the drug to the database without the defaults
- @param acNdc The ndc
- @param acMonth The month as a string
- @param acDay The day as a string
- @param acYear The year as a string
func AddPrescription ¶
func AddPrescription(prescription pkg.Prescription) (bool, int)
*
- Function: AddPrescription
- Description: Adds a prescription type order to the orderdb
- @param prescription The prescription to add to the DB
func AddPurchase ¶
*
- Function: AddPurchase
- Description: Adds a purchase type order to the orderdb
- @param purchase The purchase to add to the DB
func AddUser ¶
* Function: AddUser Description: Adds a user to the database @param acUsername The username of the new user @param anPassVal The password value for the new user
func DeleteOrder ¶
func DeleteOrder(anId int64)
*
- Function: DeleteOrder
- Description: Delete the order with the given id.
- @param acId The id to DELETE
func FindNDC ¶
func FindNDC(acNdc string) (string, string, string, string, string, time.Time, float64, []pkg.Order)
*
- Function: FindNDC
- Description: Given a NDC, finds AND returns all corresponding rows
- @param ndc The NDC to match
- @return An array of orders with the given NDC, vital drug information
func GetOrder ¶
*
- Function: GetOrder
- Description: Gets the fields of an order that weren't specified by user
- @param order The order id to get
func GetUsers ¶
* Function: GetUsers Description: Grabs all of the users from the database @return An array of User structures
func NewCheck ¶
*
- Function: NewCheck
- Description: See if the drug is in the database yet
- @param acNdc The NDC of the drug to check
- @return If the drug is in the database
func UpdateDrug ¶
func UpdateDrug(acSize string, acForm string, acItemNum string, acName string, acNdc string, arQty float64, acOldNdc string)
*
- Function: UpdateDrug
- Description: Adds the correct default values to a drug
- @param acSize The size of the packet
- @param acForm The form of the drug
- @param acItemNum The item number of the drug
- @param acName The name of the drug
- @param acNdc The ndc of the drug
- @param acOldNdc The ndc of the drug on first entry
func UpdateOrder ¶
*
- Function: UpdateOrder
- Description: Updates the quantity of an order specified by the passed in id. This
- also update all Over/Shorts after the specified orders AND the total drug qty
- @param acId The id of the order to edit
- @param acScript The script number of the order
- @param acQty The new quantity
func UpdateOrderNdc ¶
*
- Method: UpdateOrderNdc
- Description: Reset the ndc of an order
- @param acId The id of the order to change
- @param acNdc The new ndc
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.