Documentation

HL7 Resources

Article author
Admin
  • Updated

EDI API defines HL7 resources for all HL7 core items, such as control segments, interchange, group, transaction, and the validation/operation result, that are represented by JSON.

 

Hl7Interchange

Hl7Interchange object represents an HL7 file. You get an array of HL7 interchanges as part of the Read operation when translating an HL7 file to JSON. The Read operation supports HL7 files that contain multiple interchanges, that's why the response is an array. In most situations, the array will contain only a single item. Hl7Interchange is intended to cater to both batches of HL7 messages and single messages. When used as a batch, the FHS segment must be present.

The Hl7Interchange object can be used with the Write operation, to translate it into an HL7 file, and with the Validate operation, to validate that the interchange is compliant.

 

Endpoints

POST /hl7/read Response
POST /hl7/write Request
POST /hl7/validate Request

 

Example

{
"FHS": {
  "FieldSeparator_01": "|",
  "FileEncodingCharacters_02": "^~\\&",
  "FileSendingApplication_03": {
	"NamespaceID_01": "LCAMC"
  },
  "FileSendingFacility_04": {
	"NamespaceID_01": "LAB"
  },
  "FileReceivingApplication_05": {
	"NamespaceID_01": "PLUS"
  },
  "FileReceivingFacility_06": {
	"NamespaceID_01": "PLU"
  },
  "FileCreationDateTime_07": "20160927123530",
  "FileHeaderComment_10": "TEST",
  "FileControlID_11": "F1627112308801"
},
"Groups": [
  {
	"BHS": {
	  "FieldSeparator_01": "|",
	  "BatchEncodingCharacters_02": "^~\\&",
	  "BatchSendingApplication_03": {
		"NamespaceID_01": "LCAMC"
	  },
	  "BatchSendingFacility_04": {
		"NamespaceID_01": "LAB"
	  },
	  "BatchReceivingApplication_05": {
		"NamespaceID_01": "PLUS"
	  },
	  "BatchReceivingFacility_06": {
		"NamespaceID_01": "PLU"
	  },
	  "BatchCreationDateTime_07": "20160927123530",
	  "BatchControlID_11": "B000001"
	},
	"Transactions": [
	  {
		"MSH": {
		  "FieldSeparator_01": "|",
		  "EncodingCharacters_02": "^~\\&",
		  "SendingApplication_03": {
			"NamespaceID_01": "Pharm"
		  },
		  "SendingFacility_04": {
			"NamespaceID_01": "GenHosp"
		  },
		  "ReceivingApplication_05": {
			"NamespaceID_01": "IE"
		  },
		  "DateTimeOfMessage_07": "2006052911150700",
		  "MessageType_09": {
			"MessageCode_01": "RDS",
			"TriggerEvent_02": "O13",
			"MessageStructure_03": "RDS_O13"
		  },
		  "MessageControlID_10": "MSG00001-",
		  "ProcessingID_11": {
			"ProcessingID_01": "P"
		  },
		  "VersionID_12": {
			"VersionID_01": "2.6"
		  }
		},
		"_comment": "... model specific content goes here ...",
	],
	"BTSTrailers": [
	  {
		"BatchMessageCount_01": "2"
	  }
	]
  }
],
"FTSTrailers": [
  {
	"FileBatchCount_01": "2"
  }
],
"Result": {
  "LastIndex": 36,
  "Details": [],
  "Status": "success"
}
}

 

Attributes

  • FHS FHS object

    The FHS segment. Only used when the HL7 file is a batch.

  • Groups list of Hl7Group objects

    The list of HL7 batches.

  • FTSTrailers list of FTS objects

    The list of trailers. Always contains one item for valid interchanges.

  • Result OperationResult object

    The operation result.

 

FHS

The FHS object is only used as part of the Hl7Interchange object and represents the standard HL7 FHS file header segment. The FHS segment is used to head a file (group of batches).

 

Example

{
  "FieldSeparator_01": "|",
  "FileEncodingCharacters_02": "^~\\&",
  "FileSendingApplication_03": {
	"NamespaceID_01": "LCAMC"
  },
  "FileSendingFacility_04": {
	"NamespaceID_01": "LAB"
  },
  "FileReceivingApplication_05": {
	"NamespaceID_01": "PLUS"
  },
  "FileReceivingFacility_06": {
	"NamespaceID_01": "PLU"
  },
  "FileCreationDateTime_07": "20160927123530",
  "FileHeaderComment_10": "TEST",
  "FileControlID_11": "F1627112308801"
}

 

Attributes

  • FieldSeparator_01 string

    File Field Separator.

  • FileEncodingCharacters_02 string

    The file separators.

  • FileSendingApplication_03 object

    The sending application.

    1. NamespaceID_01 string

      Local identifier

    2. UniversalID_02 string

      Universal identifier.

    3. UniversalIDType_03 string

      The context of the universal identifier.

  • FileSendingFacility_04 object

    The sending facility.

    1. NamespaceID_01 string

      Local identifier

    2. UniversalID_02 string

      Universal identifier.

    3. UniversalIDType_03 string

      The context of the universal identifier.

  • FileReceivingApplication_05 object

    The receiving application.

    1. NamespaceID_01 string

      Local identifier

    2. UniversalID_02 string

      Universal identifier.

    3. UniversalIDType_03 string

      The context of the universal identifier.

  • FileReceivingFacility_06 object

    The receiving facility.

    1. NamespaceID_01 string

      Local identifier

    2. UniversalID_02 string

      Universal identifier.

    3. UniversalIDType_03 string

      The context of the universal identifier.

  • FileCreationDateTime_07 string

    The date and time when the file was created.

  • FileSecurity_08 string

    Security features. Not implemented.

  • FileNameID_09 string

    This field can be used by the application processing the file. Denotes the original file name.

  • FileHeaderComment_10 string

    Free text.

  • FileControlID_11 string

    This field uniquely identifies the file.

  • ReferenceFileControlID_12 string

    The original FileControlID_11 when the file is resent. Blank when the file is sent for the first time.

  • FileSendingNetworkAddress_13 object

    Identifier of the network location the file was transmitted from.

    1. NamespaceID_01 string

      Local identifier

    2. UniversalID_02 string

      Universal identifier.

    3. UniversalIDType_03 string

      The context of the universal identifier.

  • FileReceivingNetworkAddress_14 object

    Identifier of the network location the file was transmitted to.

    1. NamespaceID_01 string

      Local identifier

    2. UniversalID_02 string

      Universal identifier.

    3. UniversalIDType_03 string

      The context of the universal identifier.

 

Hl7Group

Hl7Group object represents an HL7 batch of messages. Hl7Group object is only used as part of the Hl7Interchange object. Hl7Group is intended to cater to both batches of HL7 messages and single messages. When in batch, the BHS segment must be present.

 

Example

{
	"BHS": {
	  "FieldSeparator_01": "|",
	  "BatchEncodingCharacters_02": "^~\\&",
	  "BatchSendingApplication_03": {
		"NamespaceID_01": "LCAMC"
	  },
	  "BatchSendingFacility_04": {
		"NamespaceID_01": "LAB"
	  },
	  "BatchReceivingApplication_05": {
		"NamespaceID_01": "PLUS"
	  },
	  "BatchReceivingFacility_06": {
		"NamespaceID_01": "PLU"
	  },
	  "BatchCreationDateTime_07": "20160927123530",
	  "BatchControlID_11": "B000001"
	},
	"Transactions": [
	  {
		"MSH": {
		  "FieldSeparator_01": "|",
		  "EncodingCharacters_02": "^~\\&",
		  "SendingApplication_03": {
			"NamespaceID_01": "Pharm"
		  },
		  "SendingFacility_04": {
			"NamespaceID_01": "GenHosp"
		  },
		  "ReceivingApplication_05": {
			"NamespaceID_01": "IE"
		  },
		  "DateTimeOfMessage_07": "2006052911150700",
		  "MessageType_09": {
			"MessageCode_01": "RDS",
			"TriggerEvent_02": "O13",
			"MessageStructure_03": "RDS_O13"
		  },
		  "MessageControlID_10": "MSG00001-",
		  "ProcessingID_11": {
			"ProcessingID_01": "P"
		  },
		  "VersionID_12": {
			"VersionID_01": "2.6"
		  }
		},
		"_comment": "... model specific content goes here ...",
	],
	"BTSTrailers": [
	  {
		"BatchMessageCount_01": "2"
	  }]
}

 

Attributes

  • BHS BHS object

    The BHS segment. 

  • Transactions list of Transaction objects

    The list of transactions. This can be any type that represents a transaction which is also recognized as a model by EdiNation.

    The following transaction models are available as System models:

  • BTSTrailers list of BTS objects

    The list of group trailers. It always contains one item for valid groups.

 

BHS

BHS object is only used as part of the Hl7Interchange object and represents the start of a batch. Optional for single messages.

 

Example

{
	  "FieldSeparator_01": "|",
	  "BatchEncodingCharacters_02": "^~\\&",
	  "BatchSendingApplication_03": {
		"NamespaceID_01": "LCAMC"
	  },
	  "BatchSendingFacility_04": {
		"NamespaceID_01": "LAB"
	  },
	  "BatchReceivingApplication_05": {
		"NamespaceID_01": "PLUS"
	  },
	  "BatchReceivingFacility_06": {
		"NamespaceID_01": "PLU"
	  },
	  "BatchCreationDateTime_07": "20160927123530",
	  "BatchControlID_11": "B000001"
	}

 

Attributes

  • FieldSeparator_01 string

    Batch Field Separator.

  • BatchEncodingCharacters_02 string

    The batch separators.

  • BatchSendingApplication_03 object

    The sending application.

    1. NamespaceID_01 string

      Local identifier

    2. UniversalID_02 string

      Universal identifier.

    3. UniversalIDType_03 string

      The context of the universal identifier.

  • BatchSendingFacility_04 object

    The sending facility.

    1. NamespaceID_01 string

      Local identifier

    2. UniversalID_02 string

      Universal identifier.

    3. UniversalIDType_03 string

      The context of the universal identifier.

  • BatchReceivingApplication_05 object

    The receiving application.

    1. NamespaceID_01 string

      Local identifier

    2. UniversalID_02 string

      Universal identifier.

    3. UniversalIDType_03 string

      The context of the universal identifier.

  • BatchReceivingFacility_06 object

    The receiving facility.

    1. NamespaceID_01 string

      Local identifier

    2. UniversalID_02 string

      Universal identifier.

    3. UniversalIDType_03 string

      The context of the universal identifier.

  • BatchCreationDateTime_07 string

    The date and time when the batch was created.

  • BatchSecurity_08 string

    Security features. Not implemented.

  • BatchNameID_09 string

    This field can be used by the application processing the file. Denotes the original batch name.

  • BatchHeaderComment_10 string

    Free text.

  • BatchControlID_11 string

    This field uniquely identifies the batch.

  • ReferenceBatchControlID_12 string

    The original BatchControlID_11 when the batch is resent. Blank when the batch is sent for the first time.

  • BatchSendingNetworkAddress_13 object

    Identifier of the network location the batch was transmitted from.

    1. NamespaceID_01 string

      Local identifier

    2. UniversalID_02 string

      Universal identifier.

    3. UniversalIDType_03 string

      The context of the universal identifier.

  • BatchReceivingNetworkAddress_14 object

    Identifier of the network location the batch was transmitted to.

    1. NamespaceID_01 string

      Local identifier

    2. UniversalID_02 string

      Universal identifier.

    3. UniversalIDType_03 string

      The context of the universal identifier.

 

BTS

BTS object is only used as part of the Hl7Interchange object and represents the end of a batch. Optional for single messages.

 

Example

{
   "BatchMessageCount_01": "2"
}

 

Attributes

  • BatchMessageCount_01 string

    This field contains the count of the individual messages contained within the batch.

  • BatchComment_02 string

    Free text.

  • BatchTotals_03 list of string

    This field contains the batch total. It is repeatable.

 

FTS

FTS object is only used as part of the Hl7Interchange object and defines the end of a file.

 

Example

{
    "FileBatchCount_01": "2"
}

 

Attributes

  • FileBatchCount_01 string

    This field contains the number of batches contained in this file.

  • FileTrailerComment_02 string

    Free text.

 

Share this:

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.