database

package
v0.2.1-alpha Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateExamParams

type CreateExamParams struct {
	OrderID       pgtype.Int8
	VisitID       pgtype.Int8
	MrnID         pgtype.Int8
	SiteID        pgtype.Int4
	ProcedureID   pgtype.Int4
	Accession     string
	CurrentStatus string
	ScheduleDt    pgtype.Timestamp
	BeginExamDt   pgtype.Timestamp
	EndExamDt     pgtype.Timestamp
}

type CreateMessageParams

type CreateMessageParams struct {
	FieldSeparator       string
	EncodingCharacters   string
	SendingApplication   string
	SendingFacility      string
	ReceivingApplication string
	ReceivingFacility    string
	ReceivedAt           pgtype.Timestamp
	MessageType          string
	TriggerEvent         string
	ControlID            string
	ProcessingID         string
	VersionID            string
}

type CreateMrnParams

type CreateMrnParams struct {
	SiteID    int32
	PatientID pgtype.Int8
	Mrn       string
}

type CreateOrderParams

type CreateOrderParams struct {
	OutsideSystemID     pgtype.Int4
	SiteID              pgtype.Int4
	VisitID             pgtype.Int8
	MrnID               pgtype.Int8
	OrderingPhysicianID pgtype.Int8
	Arrival             pgtype.Timestamp
	Number              string
	CurrentStatus       string
}

type CreatePatientParams

type CreatePatientParams struct {
	FirstName  string
	LastName   string
	MiddleName pgtype.Text
	Suffix     pgtype.Text
	Prefix     pgtype.Text
	Degree     pgtype.Text
	Dob        pgtype.Date
	Sex        string
	Ssn        pgtype.Text
	HomePhone  pgtype.Text
	WorkPhone  pgtype.Text
	CellPhone  pgtype.Text
}

type CreatePhysicianParams

type CreatePhysicianParams struct {
	FirstName  string
	LastName   string
	MiddleName pgtype.Text
	Suffix     pgtype.Text
	Prefix     pgtype.Text
	Degree     pgtype.Text
	Npi        string
	Specialty  pgtype.Text
}

type CreateProcedureParams

type CreateProcedureParams struct {
	SiteID      pgtype.Int4
	Code        string
	Description string
	Specialty   pgtype.Text
	Modality    pgtype.Text
}

type CreateReportParams

type CreateReportParams struct {
	ExamID        pgtype.Int8
	RadiologistID pgtype.Int8
	Body          string
	Impression    string
	ReportStatus  string
	SubmittedDt   pgtype.Timestamp
}

type CreateSiteParams

type CreateSiteParams struct {
	Code    string
	Name    string
	Address string
	IsCms   bool
}

type CreateVisitParams

type CreateVisitParams struct {
	OutsideSystemID pgtype.Int4
	SiteID          pgtype.Int4
	MrnID           pgtype.Int8
	Number          string
	PatientType     int16
}

type DBTX

type DBTX interface {
	Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
	Query(context.Context, string, ...interface{}) (pgx.Rows, error)
	QueryRow(context.Context, string, ...interface{}) pgx.Row
}

type Exam

type Exam struct {
	ID              int64
	CreatedAt       pgtype.Timestamp
	UpdatedAt       pgtype.Timestamp
	OutsideSystemID pgtype.Int4
	OrderID         pgtype.Int8
	VisitID         pgtype.Int8
	MrnID           pgtype.Int8
	SiteID          pgtype.Int4
	ProcedureID     pgtype.Int4
	Accession       string
	CurrentStatus   string
	ScheduleDt      pgtype.Timestamp
	BeginExamDt     pgtype.Timestamp
	EndExamDt       pgtype.Timestamp
}

type GetExamBySiteIDAccessionParams

type GetExamBySiteIDAccessionParams struct {
	SiteID    pgtype.Int4
	Accession string
}

type GetExamBySiteIDAccessionRow

type GetExamBySiteIDAccessionRow struct {
	ID                   int64
	CreatedAt            pgtype.Timestamp
	UpdatedAt            pgtype.Timestamp
	OutsideSystemID      pgtype.Int4
	OrderID              pgtype.Int8
	VisitID              pgtype.Int8
	MrnID                pgtype.Int8
	SiteID               pgtype.Int4
	ProcedureID          pgtype.Int4
	Accession            string
	CurrentStatus        string
	ScheduleDt           pgtype.Timestamp
	BeginExamDt          pgtype.Timestamp
	EndExamDt            pgtype.Timestamp
	MrnCreatedAt         pgtype.Timestamp
	MrnUpdatedAt         pgtype.Timestamp
	MrnValue             pgtype.Text
	ProcedureCreatedAt   pgtype.Timestamp
	ProcedureUpdatedAt   pgtype.Timestamp
	ProcedureCode        pgtype.Text
	ProcedureDescription pgtype.Text
	ProcedureSpecialty   pgtype.Text
	ProcedureModality    pgtype.Text
	SiteCreatedAt        pgtype.Timestamp
	SiteUpdatedAt        pgtype.Timestamp
	SiteCode             pgtype.Text
	SiteName             pgtype.Text
	SiteAddress          pgtype.Text
	SiteIsCms            pgtype.Bool
}

type GetMrnBySitePatientParams

type GetMrnBySitePatientParams struct {
	SiteID    int32
	PatientID pgtype.Int8
}

type GetOrderBySiteIDNumberParams

type GetOrderBySiteIDNumberParams struct {
	SiteID pgtype.Int4
	Number string
}

type GetOrderBySiteIDNumberRow

type GetOrderBySiteIDNumberRow struct {
	ID                   int64
	CreatedAt            pgtype.Timestamp
	UpdatedAt            pgtype.Timestamp
	OutsideSystemID      pgtype.Int4
	SiteID               pgtype.Int4
	VisitID              pgtype.Int8
	MrnID                pgtype.Int8
	OrderingPhysicianID  pgtype.Int8
	Arrival              pgtype.Timestamp
	Number               string
	CurrentStatus        string
	SiteCreatedAt        pgtype.Timestamp
	SiteUpdatedAt        pgtype.Timestamp
	SiteCode             pgtype.Text
	SiteName             pgtype.Text
	SiteAddress          pgtype.Text
	SiteIsCms            pgtype.Bool
	VisitCreatedAt       pgtype.Timestamp
	VisitUpdatedAt       pgtype.Timestamp
	VisitOutsideSystemID pgtype.Int4
	VisitNumber          pgtype.Text
	VisitPatientType     pgtype.Int2
	MrnCreatedAt         pgtype.Timestamp
	MrnUpdatedAt         pgtype.Timestamp
	MrnValue             pgtype.Text
	PhysicianCreatedAt   pgtype.Timestamp
	PhysicianUpdatedAt   pgtype.Timestamp
	PhysicianFirstName   pgtype.Text
	PhysicianLastName    pgtype.Text
	PhysicianMiddleName  pgtype.Text
	PhysicianSuffix      pgtype.Text
	PhysicianPrefix      pgtype.Text
	PhysicianDegree      pgtype.Text
	PhysicianNpi         pgtype.Text
	PhysicianSpecialty   pgtype.Text
}

type GetPatientByNameSSNParams

type GetPatientByNameSSNParams struct {
	FirstName string
	LastName  string
	Dob       pgtype.Date
	Ssn       pgtype.Text
}

type GetPhysicianByNameNPIParams

type GetPhysicianByNameNPIParams struct {
	FirstName string
	LastName  string
	Npi       string
}

type GetProcedureBySiteIDCodeParams

type GetProcedureBySiteIDCodeParams struct {
	SiteID pgtype.Int4
	Code   string
}

type GetVisitBySiteIdNumberParams

type GetVisitBySiteIdNumberParams struct {
	SiteID pgtype.Int4
	Number string
}

type GetVisitBySiteIdNumberRow

type GetVisitBySiteIdNumberRow struct {
	ID              int64
	CreatedAt       pgtype.Timestamp
	UpdatedAt       pgtype.Timestamp
	OutsideSystemID pgtype.Int4
	SiteID          pgtype.Int4
	MrnID           pgtype.Int8
	Number          string
	PatientType     int16
	SiteCreatedAt   pgtype.Timestamp
	SiteUpdatedAt   pgtype.Timestamp
	SiteCode        pgtype.Text
	SiteName        pgtype.Text
	SiteAddress     pgtype.Text
	SiteIsCms       pgtype.Bool
	MrnCreatedAt    pgtype.Timestamp
	MrnUpdatedAt    pgtype.Timestamp
	MrnValue        pgtype.Text
}

type Message

type Message struct {
	ID                   int64
	CreatedAt            pgtype.Timestamp
	UpdatedAt            pgtype.Timestamp
	FieldSeparator       string
	EncodingCharacters   string
	SendingApplication   string
	SendingFacility      string
	ReceivingApplication string
	ReceivingFacility    string
	ReceivedAt           pgtype.Timestamp
	MessageType          string
	TriggerEvent         string
	ControlID            string
	ProcessingID         string
	VersionID            string
}

type Metasite

type Metasite struct {
	ID        int32
	CreatedAt pgtype.Timestamp
	UpdatedAt pgtype.Timestamp
	Name      string
	IsOrg     bool
}

type Mrn

type Mrn struct {
	ID        int64
	CreatedAt pgtype.Timestamp
	UpdatedAt pgtype.Timestamp
	PatientID pgtype.Int8
	Mrn       string
	SiteID    int32
}

type Order

type Order struct {
	ID                  int64
	CreatedAt           pgtype.Timestamp
	UpdatedAt           pgtype.Timestamp
	OutsideSystemID     pgtype.Int4
	SiteID              pgtype.Int4
	VisitID             pgtype.Int8
	MrnID               pgtype.Int8
	OrderingPhysicianID pgtype.Int8
	Arrival             pgtype.Timestamp
	Number              string
	CurrentStatus       string
}

type OutsideSystem

type OutsideSystem struct {
	ID         int32
	CreatedAt  pgtype.Timestamp
	UpdatedAt  pgtype.Timestamp
	MetasiteID pgtype.Int4
	Name       string
}

type Patient

type Patient struct {
	ID         int64
	CreatedAt  pgtype.Timestamp
	UpdatedAt  pgtype.Timestamp
	FirstName  string
	LastName   string
	MiddleName pgtype.Text
	Suffix     pgtype.Text
	Prefix     pgtype.Text
	Degree     pgtype.Text
	Dob        pgtype.Date
	Sex        string
	Ssn        pgtype.Text
	HomePhone  pgtype.Text
	WorkPhone  pgtype.Text
	CellPhone  pgtype.Text
}

type Physician

type Physician struct {
	ID         int64
	CreatedAt  pgtype.Timestamp
	UpdatedAt  pgtype.Timestamp
	FirstName  string
	LastName   string
	MiddleName pgtype.Text
	Suffix     pgtype.Text
	Prefix     pgtype.Text
	Degree     pgtype.Text
	Npi        string
	Specialty  pgtype.Text
}

type Procedure

type Procedure struct {
	ID          int32
	CreatedAt   pgtype.Timestamp
	UpdatedAt   pgtype.Timestamp
	SiteID      pgtype.Int4
	Code        string
	Description string
	Specialty   pgtype.Text
	Modality    pgtype.Text
}

type Queries

type Queries struct {
	// contains filtered or unexported fields
}

func New

func New(db DBTX) *Queries

func (*Queries) CreateExam

func (q *Queries) CreateExam(ctx context.Context, arg CreateExamParams) (Exam, error)

func (*Queries) CreateMessage

func (q *Queries) CreateMessage(ctx context.Context, arg CreateMessageParams) (Message, error)

func (*Queries) CreateMrn

func (q *Queries) CreateMrn(ctx context.Context, arg CreateMrnParams) (Mrn, error)

func (*Queries) CreateOrder

func (q *Queries) CreateOrder(ctx context.Context, arg CreateOrderParams) (Order, error)

func (*Queries) CreatePatient

func (q *Queries) CreatePatient(ctx context.Context, arg CreatePatientParams) (Patient, error)

func (*Queries) CreatePhysician

func (q *Queries) CreatePhysician(ctx context.Context, arg CreatePhysicianParams) (Physician, error)

func (*Queries) CreateProcedure

func (q *Queries) CreateProcedure(ctx context.Context, arg CreateProcedureParams) (Procedure, error)

func (*Queries) CreateReport

func (q *Queries) CreateReport(ctx context.Context, arg CreateReportParams) (Report, error)

func (*Queries) CreateSite

func (q *Queries) CreateSite(ctx context.Context, arg CreateSiteParams) (Site, error)

func (*Queries) CreateVisit

func (q *Queries) CreateVisit(ctx context.Context, arg CreateVisitParams) (Visit, error)

func (*Queries) GetExamBySiteIDAccession

func (*Queries) GetMrnBySitePatient

func (q *Queries) GetMrnBySitePatient(ctx context.Context, arg GetMrnBySitePatientParams) (Mrn, error)

func (*Queries) GetOrderBySiteIDNumber

func (q *Queries) GetOrderBySiteIDNumber(ctx context.Context, arg GetOrderBySiteIDNumberParams) (GetOrderBySiteIDNumberRow, error)

func (*Queries) GetPatientByNameSSN

func (q *Queries) GetPatientByNameSSN(ctx context.Context, arg GetPatientByNameSSNParams) (Patient, error)

func (*Queries) GetPhysicianByNameNPI

func (q *Queries) GetPhysicianByNameNPI(ctx context.Context, arg GetPhysicianByNameNPIParams) (Physician, error)

func (*Queries) GetProcedureBySiteIDCode

func (q *Queries) GetProcedureBySiteIDCode(ctx context.Context, arg GetProcedureBySiteIDCodeParams) (Procedure, error)

func (*Queries) GetSiteByCode

func (q *Queries) GetSiteByCode(ctx context.Context, code string) (Site, error)

func (*Queries) GetVisitBySiteIdNumber

func (q *Queries) GetVisitBySiteIdNumber(ctx context.Context, arg GetVisitBySiteIdNumberParams) (GetVisitBySiteIdNumberRow, error)

func (*Queries) UpdateExam

func (q *Queries) UpdateExam(ctx context.Context, arg UpdateExamParams) (Exam, error)

func (*Queries) UpdateOrder

func (q *Queries) UpdateOrder(ctx context.Context, arg UpdateOrderParams) (Order, error)

func (*Queries) UpdatePatient

func (q *Queries) UpdatePatient(ctx context.Context, arg UpdatePatientParams) (Patient, error)

func (*Queries) UpdatePhysician

func (q *Queries) UpdatePhysician(ctx context.Context, arg UpdatePhysicianParams) (Physician, error)

func (*Queries) UpdateVisit

func (q *Queries) UpdateVisit(ctx context.Context, arg UpdateVisitParams) (Visit, error)

func (*Queries) WithTx

func (q *Queries) WithTx(tx pgx.Tx) *Queries

type Report

type Report struct {
	ID            int64
	CreatedAt     pgtype.Timestamp
	UpdatedAt     pgtype.Timestamp
	ExamID        pgtype.Int8
	RadiologistID pgtype.Int8
	Body          string
	Impression    string
	ReportStatus  string
	SubmittedDt   pgtype.Timestamp
}

type Site

type Site struct {
	ID        int32
	CreatedAt pgtype.Timestamp
	UpdatedAt pgtype.Timestamp
	Code      string
	Name      string
	Address   string
	IsCms     bool
}

type UpdateExamParams

type UpdateExamParams struct {
	ID            int64
	OrderID       pgtype.Int8
	VisitID       pgtype.Int8
	MrnID         pgtype.Int8
	SiteID        pgtype.Int4
	ProcedureID   pgtype.Int4
	Accession     string
	CurrentStatus string
	ScheduleDt    pgtype.Timestamp
	BeginExamDt   pgtype.Timestamp
	EndExamDt     pgtype.Timestamp
}

type UpdateOrderParams

type UpdateOrderParams struct {
	ID                  int64
	OutsideSystemID     pgtype.Int4
	SiteID              pgtype.Int4
	VisitID             pgtype.Int8
	MrnID               pgtype.Int8
	OrderingPhysicianID pgtype.Int8
	Arrival             pgtype.Timestamp
	Number              string
	CurrentStatus       string
}

type UpdatePatientParams

type UpdatePatientParams struct {
	ID         int64
	FirstName  string
	LastName   string
	MiddleName pgtype.Text
	Suffix     pgtype.Text
	Prefix     pgtype.Text
	Degree     pgtype.Text
	Dob        pgtype.Date
	Sex        string
	Ssn        pgtype.Text
	HomePhone  pgtype.Text
	WorkPhone  pgtype.Text
	CellPhone  pgtype.Text
}

type UpdatePhysicianParams

type UpdatePhysicianParams struct {
	ID         int64
	FirstName  string
	LastName   string
	MiddleName pgtype.Text
	Suffix     pgtype.Text
	Prefix     pgtype.Text
	Degree     pgtype.Text
	Npi        string
	Specialty  pgtype.Text
}

type UpdateVisitParams

type UpdateVisitParams struct {
	ID              int64
	OutsideSystemID pgtype.Int4
	SiteID          pgtype.Int4
	MrnID           pgtype.Int8
	Number          string
	PatientType     int16
}

type Visit

type Visit struct {
	ID              int64
	CreatedAt       pgtype.Timestamp
	UpdatedAt       pgtype.Timestamp
	OutsideSystemID pgtype.Int4
	SiteID          pgtype.Int4
	MrnID           pgtype.Int8
	Number          string
	PatientType     int16
}

Jump to

Keyboard shortcuts

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