Documentation ¶
Index ¶
- Constants
- func BuildAL1(id int, a *ir.Allergy) (string, error)
- func BuildDG1(id int, diagnose *ir.DiagnosisOrProcedure) (string, error)
- func BuildEVN(t time.Time, messageType *Type, planned ir.NullTime, operator *ir.Doctor, ...) (string, error)
- func BuildMRG(mrns []string) (string, error)
- func BuildMSA(orderMessageControlID string) (string, error)
- func BuildMSH(t time.Time, messageType *Type, header *HeaderInfo) (string, error)
- func BuildNK1(id int, p *ir.AssociatedParty) (string, error)
- func BuildNTE(id int, note string) (string, error)
- func BuildOBR(o *ir.Order) (string, error)
- func BuildOBX(id int, r *ir.Result, o *ir.Order) (string, error)
- func BuildOBXForClinicalNote(id, contentIndex int, r *ir.Result, o *ir.Order) (string, error)
- func BuildOBXForMDM(id int, o *ir.CodedElement, line string) (string, error)
- func BuildORC(o *ir.Order) (string, error)
- func BuildPD1(p *ir.PatientInfo) (string, error)
- func BuildPID(p *ir.Person) (string, error)
- func BuildPR1(id int, procedure *ir.DiagnosisOrProcedure) (string, error)
- func BuildPV1(p *ir.PatientInfo) (string, error)
- func BuildPV2(p *ir.PatientInfo) (string, error)
- func BuildPseudoPV1() string
- func BuildTXA(p *ir.PatientInfo, d *ir.Document) (string, error)
- func ToHL7Date(t ir.Formattable) (string, error)
- type HL7Message
- func BuildAddPersonADTA28(h *HeaderInfo, p *ir.PatientInfo, eventTime time.Time, msgTime time.Time) (*HL7Message, error)
- func BuildAdmissionADTA01(h *HeaderInfo, p *ir.PatientInfo, eventTime time.Time, msgTime time.Time) (*HL7Message, error)
- func BuildBedSwapADTA17(h *HeaderInfo, p *ir.PatientInfo, eventTime time.Time, msgTime time.Time, ...) (*HL7Message, error)
- func BuildCancelDischargeADTA13(h *HeaderInfo, p *ir.PatientInfo, eventTime time.Time, msgTime time.Time) (*HL7Message, error)
- func BuildCancelPendingAdmitADTA27(h *HeaderInfo, p *ir.PatientInfo, eventTime time.Time, msgTime time.Time) (*HL7Message, error)
- func BuildCancelPendingDischargeADTA25(h *HeaderInfo, p *ir.PatientInfo, eventTime time.Time, msgTime time.Time) (*HL7Message, error)
- func BuildCancelPendingTransferADTA26(h *HeaderInfo, p *ir.PatientInfo, eventTime time.Time, msgTime time.Time) (*HL7Message, error)
- func BuildCancelTransferADTA12(h *HeaderInfo, p *ir.PatientInfo, eventTime time.Time, msgTime time.Time) (*HL7Message, error)
- func BuildCancelVisitADTA11(h *HeaderInfo, p *ir.PatientInfo, eventTime time.Time, msgTime time.Time) (*HL7Message, error)
- func BuildDeleteVisitADTA23(h *HeaderInfo, p *ir.PatientInfo, eventTime time.Time, msgTime time.Time) (*HL7Message, error)
- func BuildDischargeADTA03(h *HeaderInfo, p *ir.PatientInfo, eventTime time.Time, msgTime time.Time) (*HL7Message, error)
- func BuildDocumentNotificationMDMT02(h *HeaderInfo, p *ir.PatientInfo, d *ir.Document, eventTime time.Time, ...) (*HL7Message, error)
- func BuildMergeADTA34(h *HeaderInfo, p *ir.PatientInfo, eventTime time.Time, msgTime time.Time, ...) (*HL7Message, error)
- func BuildMergeADTA40(h *HeaderInfo, p *ir.PatientInfo, eventTime time.Time, msgTime time.Time, ...) (*HL7Message, error)
- func BuildOrderORMO01(h *HeaderInfo, p *ir.PatientInfo, o *ir.Order, msgTime time.Time) (*HL7Message, error)
- func BuildPathologyORRO02(h *HeaderInfo, p *ir.PatientInfo, o *ir.Order, msgTime time.Time) (*HL7Message, error)
- func BuildPendingAdmissionADTA14(h *HeaderInfo, p *ir.PatientInfo, eventTime time.Time, msgTime time.Time) (*HL7Message, error)
- func BuildPendingDischargeADTA16(h *HeaderInfo, p *ir.PatientInfo, eventTime time.Time, msgTime time.Time) (*HL7Message, error)
- func BuildPendingTransferADTA15(h *HeaderInfo, p *ir.PatientInfo, eventTime time.Time, msgTime time.Time) (*HL7Message, error)
- func BuildPreAdmitADTA05(h *HeaderInfo, p *ir.PatientInfo, eventTime time.Time, msgTime time.Time) (*HL7Message, error)
- func BuildRegistrationADTA04(h *HeaderInfo, p *ir.PatientInfo, eventTime time.Time, msgTime time.Time) (*HL7Message, error)
- func BuildResultORUR01(h *HeaderInfo, p *ir.PatientInfo, o *ir.Order, msgTime time.Time) (*HL7Message, error)
- func BuildResultORUR03(h *HeaderInfo, p *ir.PatientInfo, o *ir.Order, msgTime time.Time) (*HL7Message, error)
- func BuildResultORUR32(h *HeaderInfo, p *ir.PatientInfo, o *ir.Order, msgTime time.Time) (*HL7Message, error)
- func BuildTrackArrivalADTA10(h *HeaderInfo, p *ir.PatientInfo, eventTime time.Time, msgTime time.Time) (*HL7Message, error)
- func BuildTrackDepartureADTA09(h *HeaderInfo, p *ir.PatientInfo, eventTime time.Time, msgTime time.Time) (*HL7Message, error)
- func BuildTransferADTA02(h *HeaderInfo, p *ir.PatientInfo, eventTime time.Time, msgTime time.Time) (*HL7Message, error)
- func BuildUpdatePatientADTA08(h *HeaderInfo, p *ir.PatientInfo, eventTime time.Time, msgTime time.Time) (*HL7Message, error)
- func BuildUpdatePersonADTA31(h *HeaderInfo, p *ir.PatientInfo, eventTime time.Time, msgTime time.Time) (*HL7Message, error)
- type HeaderInfo
- type Type
Constants ¶
const ( // ADT represents an ADT HL7v2 message. ADT = "ADT" // ORM represents an ORM HL7v2 message. ORM = "ORM" // ORR represents an ORR HL7v2 message. ORR = "ORR" // ORU represents an ORU HL7v2 message. ORU = "ORU" // MDM represents an MDM HL7v2 message. MDM = "MDM" )
The fields in this block are HL7 message types Simulated Hospital supports. https://corepointhealth.com/resource-center/hl7-resources/hl7-messages/
const ( MSH = "MSH" MSA = "MSA" EVN = "EVN" PID = "PID" ORC = "ORC" OBR = "OBR" OBRClinicalNote = "OBRClinicalNote" OBX = "OBX" OBXClinicalNote = "OBXClinicalNote" OBXForMDM = "OBXForMDM" PV1 = "PV1" PV2 = "PV2" NK1 = "NK1" AL1 = "AL1" NTE = "NTE" MRG = "MRG" DG1 = "DG1" PD1 = "PD1" PR1 = "PR1" TXA = "TXA" )
Constants for segments and templates.
const DiagnosticServIDMDOC = "MDOC"
DiagnosticServIDMDOC is the value of the Diagnostic Serv ID field (OBR_24) for clinical documents.
const SegmentTerminator = constants.SegmentTerminatorStr
SegmentTerminator is the string used to terminate segments in HL7v2 messages.
Variables ¶
This section is empty.
Functions ¶
func BuildDG1 ¶
func BuildDG1(id int, diagnose *ir.DiagnosisOrProcedure) (string, error)
BuildDG1 builds and returns a HL7 DG1 segment.
func BuildEVN ¶
func BuildEVN(t time.Time, messageType *Type, planned ir.NullTime, operator *ir.Doctor, occurred ir.NullTime) (string, error)
BuildEVN builds and returns a HL7 EVN segment.
func BuildNK1 ¶
func BuildNK1(id int, p *ir.AssociatedParty) (string, error)
BuildNK1 builds and returns a HL7 NK1 segment.
func BuildOBXForClinicalNote ¶
BuildOBXForClinicalNote build and returns a HL7 OBX segment for a Clinical Note.
func BuildOBXForMDM ¶
BuildOBXForMDM builds and returns a HL7 OBX segment for MDMT02 type for an MDM message.
func BuildPD1 ¶
func BuildPD1(p *ir.PatientInfo) (string, error)
BuildPD1 builds and returns a HL7 PD1 segment.
func BuildPR1 ¶
func BuildPR1(id int, procedure *ir.DiagnosisOrProcedure) (string, error)
BuildPR1 builds and returns a HL7 PR1 segment.
func BuildPV1 ¶
func BuildPV1(p *ir.PatientInfo) (string, error)
BuildPV1 builds and returns a HL7 PV1 segment.
func BuildPV2 ¶
func BuildPV2(p *ir.PatientInfo) (string, error)
BuildPV2 builds and returns a HL7 PV2 segment.
func BuildPseudoPV1 ¶
func BuildPseudoPV1() string
BuildPseudoPV1 builds and returns a HL7 PV1 segment without any patient information. A PV1 that some messages need to send for backwards compatibility but where the visit is not relevant to the message, e.g. ADT^08. The PatientClass is set to N - Not applicable.
Types ¶
type HL7Message ¶
HL7Message represents a HL7 Message.
func BuildAddPersonADTA28 ¶
func BuildAddPersonADTA28(h *HeaderInfo, p *ir.PatientInfo, eventTime time.Time, msgTime time.Time) (*HL7Message, error)
BuildAddPersonADTA28 builds and returns a HL7 ADT^A28 message.
func BuildAdmissionADTA01 ¶
func BuildAdmissionADTA01(h *HeaderInfo, p *ir.PatientInfo, eventTime time.Time, msgTime time.Time) (*HL7Message, error)
BuildAdmissionADTA01 builds and returns a HL7 ADT^A01 message.
func BuildBedSwapADTA17 ¶
func BuildBedSwapADTA17(h *HeaderInfo, p *ir.PatientInfo, eventTime time.Time, msgTime time.Time, otherP *ir.PatientInfo) (*HL7Message, error)
BuildBedSwapADTA17 builds and returns a HL7 ADT^A17 message.
func BuildCancelDischargeADTA13 ¶
func BuildCancelDischargeADTA13(h *HeaderInfo, p *ir.PatientInfo, eventTime time.Time, msgTime time.Time) (*HL7Message, error)
BuildCancelDischargeADTA13 builds and returns a HL7 ADT^A13 message.
func BuildCancelPendingAdmitADTA27 ¶
func BuildCancelPendingAdmitADTA27(h *HeaderInfo, p *ir.PatientInfo, eventTime time.Time, msgTime time.Time) (*HL7Message, error)
BuildCancelPendingAdmitADTA27 builds and returns a HL7 ADT^A27 message.
func BuildCancelPendingDischargeADTA25 ¶
func BuildCancelPendingDischargeADTA25(h *HeaderInfo, p *ir.PatientInfo, eventTime time.Time, msgTime time.Time) (*HL7Message, error)
BuildCancelPendingDischargeADTA25 builds and returns a HL7 ADT^A25 message.
func BuildCancelPendingTransferADTA26 ¶
func BuildCancelPendingTransferADTA26(h *HeaderInfo, p *ir.PatientInfo, eventTime time.Time, msgTime time.Time) (*HL7Message, error)
BuildCancelPendingTransferADTA26 builds and returns a HL7 ADT^A26 message.
func BuildCancelTransferADTA12 ¶
func BuildCancelTransferADTA12(h *HeaderInfo, p *ir.PatientInfo, eventTime time.Time, msgTime time.Time) (*HL7Message, error)
BuildCancelTransferADTA12 builds and returns a HL7 ADT^A12 message.
func BuildCancelVisitADTA11 ¶
func BuildCancelVisitADTA11(h *HeaderInfo, p *ir.PatientInfo, eventTime time.Time, msgTime time.Time) (*HL7Message, error)
BuildCancelVisitADTA11 builds and returns a HL7 ADT^A11 message.
func BuildDeleteVisitADTA23 ¶
func BuildDeleteVisitADTA23(h *HeaderInfo, p *ir.PatientInfo, eventTime time.Time, msgTime time.Time) (*HL7Message, error)
BuildDeleteVisitADTA23 builds and returns a HL7 ADT^A23 message.
func BuildDischargeADTA03 ¶
func BuildDischargeADTA03(h *HeaderInfo, p *ir.PatientInfo, eventTime time.Time, msgTime time.Time) (*HL7Message, error)
BuildDischargeADTA03 builds and returns a HL7 ADT^A03 message.
func BuildDocumentNotificationMDMT02 ¶
func BuildDocumentNotificationMDMT02(h *HeaderInfo, p *ir.PatientInfo, d *ir.Document, eventTime time.Time, msgTime time.Time) (*HL7Message, error)
BuildDocumentNotificationMDMT02 builds and returns a HL7 MDM^T02 message.
func BuildMergeADTA34 ¶
func BuildMergeADTA34(h *HeaderInfo, p *ir.PatientInfo, eventTime time.Time, msgTime time.Time, withMRN string) (*HL7Message, error)
BuildMergeADTA34 builds and returns a HL7 ADT^A34 message.
func BuildMergeADTA40 ¶
func BuildMergeADTA40(h *HeaderInfo, p *ir.PatientInfo, eventTime time.Time, msgTime time.Time, withMRN []string) (*HL7Message, error)
BuildMergeADTA40 builds and returns a HL7 ADT^A40 message.
func BuildOrderORMO01 ¶
func BuildOrderORMO01(h *HeaderInfo, p *ir.PatientInfo, o *ir.Order, msgTime time.Time) (*HL7Message, error)
BuildOrderORMO01 builds and returns a HL7 ORM^O01 message.
func BuildPathologyORRO02 ¶
func BuildPathologyORRO02(h *HeaderInfo, p *ir.PatientInfo, o *ir.Order, msgTime time.Time) (*HL7Message, error)
BuildPathologyORRO02 builds and returns a HL7 ORR^O02 message.
func BuildPendingAdmissionADTA14 ¶
func BuildPendingAdmissionADTA14(h *HeaderInfo, p *ir.PatientInfo, eventTime time.Time, msgTime time.Time) (*HL7Message, error)
BuildPendingAdmissionADTA14 builds and returns a HL7 ADT^A14 message.
func BuildPendingDischargeADTA16 ¶
func BuildPendingDischargeADTA16(h *HeaderInfo, p *ir.PatientInfo, eventTime time.Time, msgTime time.Time) (*HL7Message, error)
BuildPendingDischargeADTA16 builds and returns a HL7 ADT^A16 message.
func BuildPendingTransferADTA15 ¶
func BuildPendingTransferADTA15(h *HeaderInfo, p *ir.PatientInfo, eventTime time.Time, msgTime time.Time) (*HL7Message, error)
BuildPendingTransferADTA15 builds and returns a HL7 ADT^A15 message.
func BuildPreAdmitADTA05 ¶
func BuildPreAdmitADTA05(h *HeaderInfo, p *ir.PatientInfo, eventTime time.Time, msgTime time.Time) (*HL7Message, error)
BuildPreAdmitADTA05 builds and returns a HL7 ADT^A05 message.
func BuildRegistrationADTA04 ¶
func BuildRegistrationADTA04(h *HeaderInfo, p *ir.PatientInfo, eventTime time.Time, msgTime time.Time) (*HL7Message, error)
BuildRegistrationADTA04 builds and returns a HL7 ADT^A04 message.
func BuildResultORUR01 ¶
func BuildResultORUR01(h *HeaderInfo, p *ir.PatientInfo, o *ir.Order, msgTime time.Time) (*HL7Message, error)
BuildResultORUR01 builds and returns a HL7 ORU^R01 message.
func BuildResultORUR03 ¶
func BuildResultORUR03(h *HeaderInfo, p *ir.PatientInfo, o *ir.Order, msgTime time.Time) (*HL7Message, error)
BuildResultORUR03 builds and returns a HL7 ORU^R03 message.
func BuildResultORUR32 ¶
func BuildResultORUR32(h *HeaderInfo, p *ir.PatientInfo, o *ir.Order, msgTime time.Time) (*HL7Message, error)
BuildResultORUR32 builds and returns a HL7 ORU^R32 message.
func BuildTrackArrivalADTA10 ¶
func BuildTrackArrivalADTA10(h *HeaderInfo, p *ir.PatientInfo, eventTime time.Time, msgTime time.Time) (*HL7Message, error)
BuildTrackArrivalADTA10 builds and returns a HL7 ADT^A10 message.
func BuildTrackDepartureADTA09 ¶
func BuildTrackDepartureADTA09(h *HeaderInfo, p *ir.PatientInfo, eventTime time.Time, msgTime time.Time) (*HL7Message, error)
BuildTrackDepartureADTA09 builds and returns a HL7 ADT^A09 message.
func BuildTransferADTA02 ¶
func BuildTransferADTA02(h *HeaderInfo, p *ir.PatientInfo, eventTime time.Time, msgTime time.Time) (*HL7Message, error)
BuildTransferADTA02 builds and returns a HL7 ADT^A02 message.
func BuildUpdatePatientADTA08 ¶
func BuildUpdatePatientADTA08(h *HeaderInfo, p *ir.PatientInfo, eventTime time.Time, msgTime time.Time) (*HL7Message, error)
BuildUpdatePatientADTA08 builds and returns a HL7 ADT^A08 message.
func BuildUpdatePersonADTA31 ¶
func BuildUpdatePersonADTA31(h *HeaderInfo, p *ir.PatientInfo, eventTime time.Time, msgTime time.Time) (*HL7Message, error)
BuildUpdatePersonADTA31 builds and returns a HL7 ADT^A31 message.
func (HL7Message) String ¶
func (m HL7Message) String() string