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 objectThe FHS segment. Only used when the HL7 file is a batch.
- Groups
list of Hl7Group objectsThe list of HL7 batches.
- FTSTrailers
list of FTS objectsThe list of trailers. Always contains one item for valid interchanges.
- Result
OperationResult objectThe 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
stringFile Field Separator.
- FileEncodingCharacters_02
stringThe file separators.
- FileSendingApplication_03
objectThe sending application.
-
NamespaceID_01
stringLocal identifier
-
UniversalID_02
stringUniversal identifier.
-
UniversalIDType_03
stringThe context of the universal identifier.
-
- FileSendingFacility_04
objectThe sending facility.
-
NamespaceID_01
stringLocal identifier
-
UniversalID_02
stringUniversal identifier.
-
UniversalIDType_03
stringThe context of the universal identifier.
-
- FileReceivingApplication_05
objectThe receiving application.
-
NamespaceID_01
stringLocal identifier
-
UniversalID_02
stringUniversal identifier.
-
UniversalIDType_03
stringThe context of the universal identifier.
-
- FileReceivingFacility_06
objectThe receiving facility.
-
NamespaceID_01
stringLocal identifier
-
UniversalID_02
stringUniversal identifier.
-
UniversalIDType_03
stringThe context of the universal identifier.
-
- FileCreationDateTime_07
stringThe date and time when the file was created.
- FileSecurity_08
stringSecurity features. Not implemented.
- FileNameID_09
stringThis field can be used by the application processing the file. Denotes the original file name.
- FileHeaderComment_10
stringFree text.
- FileControlID_11
stringThis field uniquely identifies the file.
- ReferenceFileControlID_12
stringThe original FileControlID_11 when the file is resent. Blank when the file is sent for the first time.
- FileSendingNetworkAddress_13
objectIdentifier of the network location the file was transmitted from.
-
NamespaceID_01
stringLocal identifier
-
UniversalID_02
stringUniversal identifier.
-
UniversalIDType_03
stringThe context of the universal identifier.
-
- FileReceivingNetworkAddress_14
objectIdentifier of the network location the file was transmitted to.
-
NamespaceID_01
stringLocal identifier
-
UniversalID_02
stringUniversal identifier.
-
UniversalIDType_03
stringThe 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 objectThe BHS segment.
- Transactions
list of Transaction objectsThe 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 objectsThe 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
stringBatch Field Separator.
- BatchEncodingCharacters_02
stringThe batch separators.
- BatchSendingApplication_03
objectThe sending application.
-
NamespaceID_01
stringLocal identifier
-
UniversalID_02
stringUniversal identifier.
-
UniversalIDType_03
stringThe context of the universal identifier.
-
- BatchSendingFacility_04
objectThe sending facility.
-
NamespaceID_01
stringLocal identifier
-
UniversalID_02
stringUniversal identifier.
-
UniversalIDType_03
stringThe context of the universal identifier.
-
- BatchReceivingApplication_05
objectThe receiving application.
-
NamespaceID_01
stringLocal identifier
-
UniversalID_02
stringUniversal identifier.
-
UniversalIDType_03
stringThe context of the universal identifier.
-
- BatchReceivingFacility_06
objectThe receiving facility.
-
NamespaceID_01
stringLocal identifier
-
UniversalID_02
stringUniversal identifier.
-
UniversalIDType_03
stringThe context of the universal identifier.
-
- BatchCreationDateTime_07
stringThe date and time when the batch was created.
- BatchSecurity_08
stringSecurity features. Not implemented.
- BatchNameID_09
stringThis field can be used by the application processing the file. Denotes the original batch name.
- BatchHeaderComment_10
stringFree text.
- BatchControlID_11
stringThis field uniquely identifies the batch.
- ReferenceBatchControlID_12
stringThe original BatchControlID_11 when the batch is resent. Blank when the batch is sent for the first time.
- BatchSendingNetworkAddress_13
objectIdentifier of the network location the batch was transmitted from.
-
NamespaceID_01
stringLocal identifier
-
UniversalID_02
stringUniversal identifier.
-
UniversalIDType_03
stringThe context of the universal identifier.
-
- BatchReceivingNetworkAddress_14
objectIdentifier of the network location the batch was transmitted to.
-
NamespaceID_01
stringLocal identifier
-
UniversalID_02
stringUniversal identifier.
-
UniversalIDType_03
stringThe 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
stringThis field contains the count of the individual messages contained within the batch.
- BatchComment_02
stringFree text.
- BatchTotals_03
list of stringThis 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
stringThis field contains the number of batches contained in this file.
- FileTrailerComment_02
stringFree text.
Comments
0 comments
Please sign in to leave a comment.