models

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: May 6, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetReport added in v0.6.0

func GetReport(obx []ReportModel) entity.Report

func ToEntities added in v0.6.0

func ToEntities(exams []ExamModel) []entity.Exam

Types

type ADT

type ADT struct {
	MSH MessageModel   `hl7:"MSH"`
	EVN EventModel     `hl7:"EVN"`
	PID PatientModel   `hl7:"PID"`
	PV1 VisitModel     `hl7:"PV1"`
	IN1 InsuranceModel `hl7:"IN1"`
}

type CE

type CE struct {
	Identifier      string `hl7:"1"`
	Text            string `hl7:"2"`
	CodingSystem    string `hl7:"3"`
	AltIdentifier   string `hl7:"4"`
	AltText         string `hl7:"5"`
	AltCodingSystem string `hl7:"6"`
}

Coded Element

type CM_MSG

type CM_MSG struct {
	Name         string `hl7:"1"`
	TriggerEvent string `hl7:"2"`
}

Messate Type

type CM_NDL added in v0.6.0

type CM_NDL struct {
	ObservingPractitioner XCN    `hl7:"1"`
	ObservationDT         string `hl7:"3"`
}

Observing Practitioner (i.e. radiologist)

type CX

type CX struct {
	ID                 string `hl7:"1"`
	CheckDigit         string `hl7:"2"`
	CheckDigitScheme   string `hl7:"3"`
	AssigningAuthority string `hl7:"4"`
	IdentifierTypeCode string `hl7:"5"`
}

Extended Composite ID

type EI

type EI struct {
	EntityIdentifier string `hl7:"1"`
	NamespaceID      string `hl7:"2"`
	UniversalID      string `hl7:"3"`
	UniversalIDType  string `hl7:"4"`
}

Entity Identifier

type EventModel

type EventModel struct {
	Code       string `hl7:"EVN.1"`
	DT         string `hl7:"EVN.2"`
	OperatorID XCN    `hl7:"EVN.5"`
	OccurredDT string `hl7:"EVN.6"`
}

type ExamModel

type ExamModel struct {
	FacilityCode     string `hl7:"MSH.4"`
	MRN              CX     `hl7:"PID.3"`
	Accession        string `hl7:"ORC.2"`
	FillerOrderNo    string `hl7:"ORC.3"`
	OrderStatus      string `hl7:"ORC.5"`
	OrderDT          string `hl7:"ORC.9"`
	OrderingProvider XCN    `hl7:"ORC.12"`
	Service          CE     `hl7:"OBR.4"`
	StatusDT         string `hl7:"OBR.22"`
}

func (*ExamModel) ToEntity

func (e *ExamModel) ToEntity() entity.Exam

type HD

type HD struct {
	NamespaceID     string `hl7:"1"`
	UniversalID     string `hl7:"2"`
	UniversalIDType string `hl7:"3"`
}

Hierarchic Designator

type InsuranceModel

type InsuranceModel struct {
	SetID          string `hl7:"IN1.1"`
	PlanID         string `hl7:"IN1.2"`
	CompanyName    string `hl7:"IN1.4"`
	CompanyAddress string `hl7:"IN1.5"`
	CompanyPhone   string `hl7:"IN1.7"`
	GroupNumber    string `hl7:"IN1.8"`
	PolicyNumber   string `hl7:"IN1.36"`
}

type MessageModel

type MessageModel struct {
	FieldSeparator string `hl7:"MSH.1"`
	EncodingChars  string `hl7:"MSH.2"`
	SendingApp     string `hl7:"MSH.3"`
	SendingFac     string `hl7:"MSH.4"`
	ReceivingApp   string `hl7:"MSH.5"`
	ReceivingFac   string `hl7:"MSH.6"`
	DateTime       string `hl7:"MSH.7"`
	Type           CM_MSG `hl7:"MSH.9"`
	ControlID      string `hl7:"MSH.10"`
	ProcessingID   string `hl7:"MSH.11"`
	Version        string `hl7:"MSH.12"`
}

func (*MessageModel) ToEntity

func (m *MessageModel) ToEntity() entity.Message

type PL

type PL struct {
	PointOfCare         string `hl7:"1"`
	Room                string `hl7:"2"`
	Bed                 string `hl7:"3"`
	Facility            string `hl7:"4"`
	LocationStatus      string `hl7:"5"`
	PersonLocationType  string `hl7:"6"`
	Building            string `hl7:"7"`
	Floor               string `hl7:"8"`
	LocationDescription string `hl7:"9"`
}

Person Location

type PatientModel

type PatientModel struct {
	MRN  CX     `hl7:"PID.3"`
	Name XPN    `hl7:"PID.5"`
	DOB  string `hl7:"PID.7"`
	Sex  string `hl7:"PID.8"`
	SSN  string `hl7:"PID.19"`
}

func (*PatientModel) ToEntity

func (p *PatientModel) ToEntity() entity.Patient

type ReportModel

type ReportModel struct {
	Radiologist      CM_NDL `hl7:"OBR.32"`
	SetID            string `hl7:"OBX.1"`
	ValueType        string `hl7:"OBX.2"`
	Service          CE     `hl7:"OBX.3"`
	ObservationSubID string `hl7:"OBX.4"`
	ObservationValue string `hl7:"OBX.5"`
	ResultStatus     string `hl7:"OBX.11"`
	ObservationDT    string `hl7:"OBX.14"`
}

type VisitModel

type VisitModel struct {
	Facility         string `hl7:"MSH.4"`
	MRN              CX     `hl7:"PID.3"`
	VisitNo          string `hl7:"PV1.19"`
	Class            string `hl7:"PV1.2"`
	AssignedLocation PL     `hl7:"PV1.3"`
}

func (*VisitModel) ToEntity

func (v *VisitModel) ToEntity() entity.Visit

type XAD

type XAD struct {
	StreetAddress    string `hl7:"1"`
	OtherDesignation string `hl7:"2"`
	City             string `hl7:"3"`
	State            string `hl7:"4"`
	Zip              string `hl7:"5"`
	Country          string `hl7:"6"`
}

Extended Address

type XCN

type XCN struct {
	IDNumber   string `hl7:"1"`
	FamilyName string `hl7:"2"`
	GivenName  string `hl7:"3"`
	MiddleName string `hl7:"4"`
	Suffix     string `hl7:"5"`
	Prefix     string `hl7:"6"`
	Degree     string `hl7:"7"`
}

Extended Composite ID & Name

type XPN

type XPN struct {
	LastName   string `hl7:"1"`
	FirstName  string `hl7:"2"`
	MiddleName string `hl7:"3"`
	Suffix     string `hl7:"4"`
	Prefix     string `hl7:"5"`
	Degree     string `hl7:"6"`
}

Extended Person Name

Jump to

Keyboard shortcuts

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