Skip to contents

Convert input to a MSH segment for HL7 2.3.1 or 2.4. Outputs a character vector of length 1 with input values pipe delimited. Below function definition are helper functions for particular fields: SendingFacilityComponents, MessageTypeComponents.

Usage

MSH(
  EncodingCharacters = EncodingCharactersComponents(),
  SendingApplication = "",
  SendingFacility = SendingFacilityComponents(),
  ReceivingApplication = "",
  ReceivingFacility = "",
  DateTimeOfMessage = "",
  Security = "",
  MessageType = MessageTypeComponents(),
  MessageControlID = "",
  ProcessingID = "",
  VersionID = "",
  SequenceNumber = "",
  ContinuationPointer = "",
  AcceptAcknowledgmentType = "",
  ApplicationAcknowledgmentType = "",
  CountryCode = "",
  CharacterSet = "",
  PrincipalLanguageOfMessage = "",
  AlternateCharacterSetHandlingScheme = "",
  ConformanceStatementID = "",
  .FieldSeparator = "|",
  .version = c("2.3.1", "2.4"),
  .trim = TRUE
)

EncodingCharactersComponents(
  componentSeparator = "^",
  repetitionSeparator = "~",
  escapeCharacter = "\\",
  subcomponentSeparator = "&"
)

SendingFacilityComponents(
  namespace_ID = "",
  universalID = "",
  universalIDtype = "",
  .sep = "^",
  .trim = TRUE
)

MessageTypeComponents(
  messageType = "",
  triggerEvent = "",
  messageStructure = "",
  .sep = "^",
  .trim = TRUE
)

VersionIDComponents(
  versionId = "",
  internationalizationCode = "",
  internationalversionId = "",
  .sep = "^",
  .trim = TRUE
)

Arguments

EncodingCharacters

= EncodingCharactersComponents(),

SendingApplication

= "",

SendingFacility

= SendingFacilityComponents(),

ReceivingApplication

= "",

ReceivingFacility

= "",

DateTimeOfMessage

= "",

Security

= "",

MessageType

= MessageTypeComponents(),

MessageControlID

= "",

ProcessingID

= "",

VersionID

= "",

SequenceNumber

= "",

ContinuationPointer

= "",

AcceptAcknowledgmentType

= "",

ApplicationAcknowledgmentType

= "",

CountryCode

= "",

CharacterSet

= "",

PrincipalLanguageOfMessage

= "",

AlternateCharacterSetHandlingScheme

= "",

ConformanceStatementID

= "",

.FieldSeparator

= '|',

.version

either "2.3.1" or "2.4",

.trim

= TRUE

componentSeparator

= "^",

repetitionSeparator

= "~",

escapeCharacter

= "\",

subcomponentSeparator

= "&"

namespace_ID

= "",

universalID

= "",

universalIDtype

= "",

.sep

= "^",

messageType

= "",

triggerEvent

= "",

messageStructure

= "",

versionId

= '',

internationalizationCode

= '',

internationalversionId

= '',

Value

character vector

Functions

  • EncodingCharactersComponents(): create a character vector of length 1 with input values separated with a ^

  • SendingFacilityComponents(): create a character vector of length 1 with input values separated with a ^

  • MessageTypeComponents(): create a character vector of length 1 with input values separated with a ^

  • VersionIDComponents(): create a character vector of length 1 with input values separated with a ^