database

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: May 9, 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 {
	VisitID             pgtype.Int8
	MrnID               pgtype.Int8
	SiteID              pgtype.Int4
	ProcedureID         pgtype.Int4
	OrderingPhysicianID pgtype.Int8
	Accession           string
	CurrentStatus       string
	ScheduleDt          pgtype.Timestamp
	BeginExamDt         pgtype.Timestamp
	EndExamDt           pgtype.Timestamp
	ExamCancelledDt     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 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
	AppCode    string
	Npi        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 {
	RadiologistID pgtype.Int8
	Body          string
	Impression    string
	ReportStatus  string
	SubmittedDt   pgtype.Timestamp
}

type CreateSiteParams

type CreateSiteParams struct {
	Code    string
	Name    pgtype.Text
	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
	VisitID             pgtype.Int8
	MrnID               pgtype.Int8
	SiteID              pgtype.Int4
	ProcedureID         pgtype.Int4
	FinalReportID       pgtype.Int8
	AddendumReportID    pgtype.Int8
	Accession           string
	CurrentStatus       string
	ScheduleDt          pgtype.Timestamp
	BeginExamDt         pgtype.Timestamp
	EndExamDt           pgtype.Timestamp
	ExamCancelledDt     pgtype.Timestamp
	PrelimReportID      pgtype.Int8
	OrderingPhysicianID pgtype.Int8
}

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
	VisitID              pgtype.Int8
	MrnID                pgtype.Int8
	SiteID               pgtype.Int4
	ProcedureID          pgtype.Int4
	FinalReportID        pgtype.Int8
	AddendumReportID     pgtype.Int8
	Accession            string
	CurrentStatus        string
	ScheduleDt           pgtype.Timestamp
	BeginExamDt          pgtype.Timestamp
	EndExamDt            pgtype.Timestamp
	ExamCancelledDt      pgtype.Timestamp
	PrelimReportID       pgtype.Int8
	OrderingPhysicianID  pgtype.Int8
	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
	ProviderCreatedAt    pgtype.Timestamp
	ProviderUpdatedAt    pgtype.Timestamp
	ProviderFirstName    pgtype.Text
	ProviderLastName     pgtype.Text
	ProviderMiddleName   pgtype.Text
	ProviderSuffix       pgtype.Text
	ProviderPrefix       pgtype.Text
	ProviderDegree       pgtype.Text
	ProviderNpi          pgtype.Text
	ProviderSpecialty    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 GetPatientByNameSSNParams

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

type GetPhysicianByNameAppCodeParams added in v0.6.0

type GetPhysicianByNameAppCodeParams struct {
	FirstName string
	LastName  string
	AppCode   string
}

type GetPhysicianByNameNPIParams

type GetPhysicianByNameNPIParams struct {
	FirstName string
	LastName  string
	Npi       pgtype.Text
}

type GetProcedureBySiteIDCodeParams

type GetProcedureBySiteIDCodeParams struct {
	SiteID pgtype.Int4
	Code   string
}

type GetReportByUniqueFieldsParams

type GetReportByUniqueFieldsParams struct {
	RadiologistID pgtype.Int8
	Impression    string
	ReportStatus  string
	SubmittedDt   pgtype.Timestamp
}

type GetVisitByIdRow

type GetVisitByIdRow 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 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 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        pgtype.Text
	Specialty  pgtype.Text
	AppCode    string
}

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) (int64, 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) (int64, error)

func (*Queries) CreatePatient

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

func (*Queries) CreatePhysician

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

func (*Queries) CreateProcedure

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

func (*Queries) CreateReport

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

func (*Queries) CreateSite

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

func (*Queries) CreateVisit

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

func (*Queries) GetAllExams

func (q *Queries) GetAllExams(ctx context.Context) ([]Exam, error)

func (*Queries) GetAllReports

func (q *Queries) GetAllReports(ctx context.Context) ([]Report, error)

func (*Queries) GetExamById

func (q *Queries) GetExamById(ctx context.Context, id int64) (Exam, error)

func (*Queries) GetExamBySiteIDAccession

func (*Queries) GetMessageByID

func (q *Queries) GetMessageByID(ctx context.Context, id int64) (Message, error)

func (*Queries) GetMrnById

func (q *Queries) GetMrnById(ctx context.Context, id int64) (Mrn, error)

func (*Queries) GetMrnBySitePatient

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

func (*Queries) GetPatientById

func (q *Queries) GetPatientById(ctx context.Context, id int64) (Patient, error)

func (*Queries) GetPatientByNameSSN

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

func (*Queries) GetPhysicianById

func (q *Queries) GetPhysicianById(ctx context.Context, id int64) (Physician, error)

func (*Queries) GetPhysicianByNameAppCode added in v0.6.0

func (q *Queries) GetPhysicianByNameAppCode(ctx context.Context, arg GetPhysicianByNameAppCodeParams) (Physician, error)

func (*Queries) GetPhysicianByNameNPI

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

func (*Queries) GetProcedureById

func (q *Queries) GetProcedureById(ctx context.Context, id int32) (Procedure, error)

func (*Queries) GetProcedureBySiteIDCode

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

func (*Queries) GetReportById

func (q *Queries) GetReportById(ctx context.Context, id int64) (Report, error)

func (*Queries) GetReportByRadID added in v0.6.0

func (q *Queries) GetReportByRadID(ctx context.Context, radiologistID pgtype.Int8) (Report, error)

func (*Queries) GetReportByUniqueFields

func (q *Queries) GetReportByUniqueFields(ctx context.Context, arg GetReportByUniqueFieldsParams) (Report, error)

func (*Queries) GetSiteByCode

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

func (*Queries) GetSiteById

func (q *Queries) GetSiteById(ctx context.Context, id int32) (Site, error)

func (*Queries) GetVisitById

func (q *Queries) GetVisitById(ctx context.Context, id int64) (GetVisitByIdRow, 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) UpdateExamAddendumReport

func (q *Queries) UpdateExamAddendumReport(ctx context.Context, arg UpdateExamAddendumReportParams) (Exam, error)

func (*Queries) UpdateExamFinalReport

func (q *Queries) UpdateExamFinalReport(ctx context.Context, arg UpdateExamFinalReportParams) (Exam, error)

func (*Queries) UpdateExamPrelimReport added in v0.5.1

func (q *Queries) UpdateExamPrelimReport(ctx context.Context, arg UpdateExamPrelimReportParams) (Exam, 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
	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      pgtype.Text
	Address   string
	IsCms     bool
}

type UpdateExamAddendumReportParams

type UpdateExamAddendumReportParams struct {
	ID               int64
	AddendumReportID pgtype.Int8
}

type UpdateExamFinalReportParams

type UpdateExamFinalReportParams struct {
	ID            int64
	FinalReportID pgtype.Int8
}

type UpdateExamParams

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

type UpdateExamPrelimReportParams added in v0.5.1

type UpdateExamPrelimReportParams struct {
	ID             int64
	PrelimReportID pgtype.Int8
}

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
	AppCode    string
	Npi        pgtype.Text
	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