database

package
v0.0.0-...-29203d2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2021 License: MIT Imports: 8 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAudit

func AddAudit(audit pkg.Audit) (bool, int)

*

  • Function: AddAudit
  • Description: Adds a audit type order to the orderdb
  • @param audit The audit to add to the DB

func AddDrug

func AddDrug(acNdc string, acMonth string, acDay string, acYear string)

*

  • 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

func AddPurchase(purchase pkg.Purchase) (bool, int)

*

  • Function: AddPurchase
  • Description: Adds a purchase type order to the orderdb
  • @param purchase The purchase to add to the DB

func AddUser

func AddUser(acUsername string, acPassVal string)

* 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 GetDrug

func GetDrug(acNdc string) pkg.Drug

func GetDrugs

func GetDrugs(acName string) []pkg.DrugDB

func GetOrder

func GetOrder(anId int64) []pkg.Order

*

  • Function: GetOrder
  • Description: Gets the fields of an order that weren't specified by user
  • @param order The order id to get

func GetUsers

func GetUsers() []pkg.User

* Function: GetUsers Description: Grabs all of the users from the database @return An array of User structures

func NewCheck

func NewCheck(acNdc string) bool

*

  • 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

func UpdateOrder(acId string, acScript string, acQty string)

*

  • 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

func UpdateOrderNdc(acId string, acNdc string)

*

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL