Veterinary Terminology & Standards - Va Md College of Veterinary Medicine - Va Tech
VetSCT Browser Education Content Request Login/Register

USDA Veterinary Services - AHRMS Support

Terminology Resources | NAHLN Messaging Support | AHRMS Messaging Support

Sample Inventory Message

This page is designed to give guidance on message structure by creating a visual structure. Links will be included where appropriate to data subsets for populating fields. For this example, we've used a sample inventory message structure as if it were being captured via the MIM field system.

The resultant XML message for the sample data on this page can be found here

MSH Segment - Message Header
hl7:MSH.1 HL7 Required Constant String |
hl7:MSH.2 HL7 Required Constant String ^~\&
hl7:MSH.3 Sending Application: Database or system from which the data is sent HD MIM
2.16.840.1.113883.3.5.20.2.x.x*
ISO
hl7:MSH.4 Sending Facility: Originating facility such as State, Laboratory, etc. There will be times when there is no originating facility or organization. In those instances send "Not Applicable"to fulfill HL7 requirement HD Not Applicable
hl7:MSH.7 Message Date/Time Date/Time 2024-10-17
hl7:MSH.9 HL7 Message Type MSG MSG.1:ORU
MSG.2:R01
MSG.3:ORU_R01
hl7:MSH.10 Message Identifier: Each sending system must be set up to create a unique identifier for each and every message it sends. These may end up duplicating the IDs created by other sending systems and will be distinguished by the sending facility and/or sending application identifiers. Ex Event ID from their system String e0dd9fba-e0ba-43eb-9873-05ae9e7ae9c0
hl7:MSH.11 Processing Id (Required): P (Production), D (Development), T (training) PT.1 P
hl7:MSH.12 HL7 Version Id (Required) VID.1 2.8.2
hl7:MSH.21 Message Profile - Schema name with version EI AHRMS_v1
2.16.840.1.113883.3.5.9
ISO
PATIENT_RESULT Group

Contains Summary Information for the Group. Individual Animals follow with Additional PATIENT_RESULT groups.

PATIENT Group
PID Segment
hl7:PID.3 Required Identifier (AIN or GIN Preferred)
If patient is an individual animal, this field must be populated with some sort of identifier. If the patient is a group of animals and there's a logical identifier for the entire group, include it here. If the patient is a group of animals and there is NOT a logical identifier for the entire group, then return Not Provided text string with hl7:hl7:CX.5 of GRID (Group Identifier)
CX CX.1: NI
CX.5: GRID
hl7:PID.5 Patient Name: Required for HL7, but often not provided for veterinary patients FN FN.1: Not Provided
hl7:PID.35 Patient Taxonomic Classification - VS Taxonomy Subset CWE CWE.1: 107007004
CWE.2: Subfamily Bovinae
CWE.3: SCT
CWE.9: BOV
PATIENT_PARTICIPATION group
PRT Segment
hl7:PRT.2 Required Constant for AHRMS Messaging String AD
hl7:PRT.4 Required - Partipation Type CWE CWE.1:PREM
CWE.2:Source Premises
CWE.3:HL70912
hl7:PRT.8 Participation Organization XON XON.1: Example Livestock Market
hl7:PRT.9 Participant Location - This field specifies the physical location (e.g., nurse station, ancillary service location, clinic, or floor) that is participating. If either PRT-5 Participation Person or PRT-8 Participation Organization is valued, it reflects the location of the individual or organization participating as identified in PRT-4 Participation. Otherwise the location is directly participating as identified in PRT-4 Participation. If this attribute repeats, all instances must represent the same Location. PL PL.4: (Facility or Premises)
HD.1: 0055A5X (PIN)
HD.2: 2.16.840.1.113883.3.5.20.2.x.x* (OID for PIN)
HD.3: ISO
PL.6: M (Person Location Type)
hl7:PRT.14 Participation Address - Repeating segments can be alternate addresses or alternate representatives of the same address XAD XAD.1: (Street Address)
SAD.1: 170 Livestock Rd
XAD.3: Blackstone (City)
XAD.4: VA (State)
XAD.5: 23824 (Zip Code)
XAD.6: USA (Country)
XAD.9: (County)
CWE.1: 135
CWE.2: Nottoway
CWE.3: FIPS6_4
OBX Segment
hl7:OBX.2 Required - Datatype of value in OBX.5 OR hl7:CWE if OBX.8 is used and OBX.5 is not sent String CWE
hl7:OBX.3 Required - Observation Identifier CWE CWE.1: X000-0*
CWE.2: Species on Premises
CWE.3: LN
hl7:OBX.4 Required - Observation Sub-Id OG OG.1: 1
hl7:OBX.5 Required - Observation "Result" CWE (from OBX.2) CWE.1: 107007004
CWE.2: Subfamily Bovinae
CWE.3: SCT
hl7:OBX.5 Required - Observation "Result" CWE (from OBX.2) CWE.1: 125099002
CWE.2: Ovis aries (organism)
CWE.3: SCT
hl7:OBX.11 Required - Observation Results Status - should always be F for Final String F
hl7:OBX.14 Required - Date/Time Of The Observation DTM 20241017-0500
PATIENT_PARTICIPATION group
PRT Segment
hl7:PRT.2 Required Constant for AHRMS Messaging String AD
hl7:PRT.4 Required - Partipation Type CWE CWE.1:ANO
CWE.2:Non-owner contact
CWE.3:HL70912
hl7:PRT.5 Participation Person XCN XCN.2:
FN.1: Smith
XCN.3: William
hl7:PRT.8 Participation Organization XON XON.1: Example Livestock Market
hl7:PRT.14 Participation Address - Repeating segments can be alternate addresses or alternate representatives of the same address XAD XAD.1: (Street Address)
SAD.1: 170 Livestock Rd
XAD.3: Blackstone (City)
XAD.4: VA (State)
XAD.5: 23824 (Zip Code)
XAD.6: USA (Country)
XAD.9: (County)
CWE.1: 135
CWE.2: Nottoway
CWE.3: FIPS6_4
hl7:PRT.15 Participation Phone/Email XTN XTN.2: WPN (Telecommunication Use Code)
XTN.3: PH (Telecommunication Equipment Type)
XTN.12: 3332927277 (Telephone number, no format imposed)
VISIT group
PV1 Segment
hl7:PV1.2 Required - Patient Class: S (Single Animal), G (Group), M (Commodity) CWE CWE.1:G
CWE.2:Group
CWE.3:HL70004
hl7:PV1.19 Required - Accession> CX CX.1: 20241010113034
CX.4:
HD.1: MIM
HD.2: 2.16.840.1.113883.3.5.20.2.x.x*
HD.3: ISO
CX.5: ACSN
PV2 Segment
hl7:PV2.3 Admit Reason - This field contains the type of regulatory activity being transmitted in the message. It is expected that there will be one type for each message, and it will correspond to the activity identifier in PV1.19. The VISIT group will repeat for each PATIENT group involved in the activity and therefore the message. CWE CWE.1:X000-0*
CWE.2:Inventory
CWE.3:LN
CWE.9: INV (MIM code for Inventory)
 
ORDER_OBSERVATION Group
OBR Segment
hl7:OBR.4 Required - LOINC code for Observation or set of Observations that are being requested/reportedUniversal Identifier CWE CWE.1:X000-0*
CWE.2:Total Number Observed
CWE.3:LN
OBSERVATION group
OBX Segment
hl7:OBX.2 Required - Datatype of value in OBX.5 OR hl7:CWE if OBX.8 is used and OBX.5 is not sent String NM
hl7:OBX.3 Required - Observation Identifier CWE CWE.1:X000-0*
CWE.2:Total Number Observed
CWE.3:LN
hl7:OBX.4 Required - Observation Sub-Id OG OG.1:1
hl7:OBX.5 Required - Observation "Result" NM (from OBX.2) 7
hl7:OBX.11 Required - Observation Results Status - should always be F for Final String F
hl7:OBX.14 Required - Date/Time Of The Observation DTM 20241010113034-0500
PATIENT_RESULT Group

Individual Animal information and observations. Would repeat for every animal.

PATIENT Group
PID Segment
hl7:PID.3 Required Identifier (AIN or GIN Preferred)
If patient is an individual animal, this field must be populated with some sort of identifier. If the patient is a group of animals and there's a logical identifier for the entire group, include it here. If the patient is a group of animals and there is NOT a logical identifier for the entire group, then return Not Provided text string with hl7:hl7:CX.5 of GRID (Group Identifier)
CX CX.1: 111111111111
CX.4:
HD.2: 2.16.840.1.113883.3.5.6.1.2 (OID for USAIN)
HD.3: ISO
CX.5: USAIN
hl7:PID.3 Required Identifier (AIN or GIN Preferred)
If patient is an individual animal, this field must be populated with some sort of identifier. If the patient is a group of animals and there's a logical identifier for the entire group, include it here. If the patient is a group of animals and there is NOT a logical identifier for the entire group, then return Not Provided text string with hl7:CX.5 of GRID (Group Identifier)
CX CX.1: 1076
CX.5: TAGOE
hl7:PID.3 Required Identifier (AIN or GIN Preferred)
If patient is an individual animal, this field must be populated with some sort of identifier. If the patient is a group of animals and there's a logical identifier for the entire group, include it here. If the patient is a group of animals and there is NOT a logical identifier for the entire group, then return Not Provided text string with hl7:CX.5 of GRID (Group Identifier)
CX CX.1: 1b3ca36a7-d535-43ec-aecc-36ac3a6126a8
CX.5: LclAppID
hl7:PID.5 Patient Name: Required for HL7, but often not provided for veterinary patients FN FN.1: Not Provided
hl7:PID.8 Administrative Sex: F, S, M, C, U, X CWE PID.8: CWE.1: F
hl7:PID.35 Patient Taxonomic Classification - VS Taxonomy Subset CWE CWE.1: 84923006
CWE.2: Aberdeen Angus Cattle Breed
CWE.3: SCT
CWE.9: AN
PATIENT_PARTICIPATION group
PRT Segment
hl7:PRT.2 Required Constant for AHRMS Messaging String AD
hl7:PRT.4 Required - Partipation Type CWE CWE.1:PREM
CWE.2:Source Premises
CWE.3:HL70912
hl7:PRT.8 Participation Organization XON XON.1: Example Livestock Market
hl7:PRT.9 Participant Location - This field specifies the physical location (e.g., nurse station, ancillary service location, clinic, or floor) that is participating. If either PRT-5 Participation Person or PRT-8 Participation Organization is valued, it reflects the location of the individual or organization participating as identified in PRT-4 Participation. Otherwise the location is directly participating as identified in PRT-4 Participation. If this attribute repeats, all instances must represent the same Location. PL PL.4: (Facility or Premises)
HD.1: 0055A5X (PIN)
HD.2: 2.16.840.1.113883.3.5.20.2.x.x* (OID for PIN)
HD.3: ISO
PL.6: M (Person Location Type)
hl7:PRT.14 Participation Address - Repeating segments can be alternate addresses or alternate representatives of the same address XAD XAD.1: (Street Address)
SAD.1: 170 Livestock Rd
XAD.3: Blackstone (City)
XAD.4: VA (State)
XAD.5: 23824 (Zip Code)
XAD.6: USA (Country)
XAD.9: (County)
CWE.1: 135
CWE.2: Nottoway
CWE.3: FIPS6_4
OBX Segment
hl7:OBX.2 Required - Datatype of value in OBX.5 OR hl7:CWE if OBX.8 is used and OBX.5 is not sent String CWE
hl7:OBX.3 Required - Observation Identifier CWE CWE.1: X000-0*
CWE.2: Species on Premises
CWE.3: LN
hl7:OBX.4 Required - Observation Sub-Id OG OG.1: 1
hl7:OBX.5 Required - Observation "Result" CWE (from OBX.2) CWE.1: 107007004
CWE.2: Subfamily Bovinae
CWE.3: SCT
hl7:OBX.5 Required - Observation "Result" CWE (from OBX.2) CWE.1: 125099002
CWE.2: Ovis aries (organism)
CWE.3: SCT
hl7:OBX.11 Required - Observation Results Status - should always be F for Final String F
hl7:OBX.14 Required - Date/Time Of The Observation DTM 20241017-0500
PATIENT_PARTICIPATION group
PRT Segment
hl7:PRT.2 Required Constant for AHRMS Messaging String AD
hl7:PRT.4 Required - Partipation Type CWE CWE.1:ANO
CWE.2:Non-owner contact
CWE.3:HL70912
hl7:PRT.5 Participation Person XCN XCN.2:
FN.1: Smith
XCN.3: William
hl7:PRT.8 Participation Organization XON XON.1: Example Livestock Market
hl7:PRT.14 Participation Address - Repeating segments can be alternate addresses or alternate representatives of the same address XAD XAD.1: (Street Address)
SAD.1: 170 Livestock Rd
XAD.3: Blackstone (City)
XAD.4: VA (State)
XAD.5: 23824 (Zip Code)
XAD.6: USA (Country)
XAD.9: (County)
CWE.1: 135
CWE.2: Nottoway
CWE.3: FIPS6_4
hl7:PRT.15 Participation Phone/Email XTN XTN.2: WPN (Telecommunication Use Code)
XTN.3: PH (Telecommunication Equipment Type)
XTN.12: 3332927277 (Telephone number, no format imposed)
VISIT group
PV1 Segment
hl7:PV1.2 Required - Patient Class: S (Single Animal), G (Group), M (Commodity) CWE CWE.1:S
CWE.2:Single Animal
CWE.3:HL70004
hl7:PV1.19 Required - Accession> CX CX.1: 20241010113034
CX.4:
HD.1: MIM
HD.2: 2.16.840.1.113883.3.5.20.2.x.x*
HD.3: ISO
CX.5: ACSN
PV2 Segment
hl7:PV2.3 Admit Reason - This field contains the type of regulatory activity being transmitted in the message. It is expected that there will be one type for each message, and it will correspond to the activity identifier in PV1.19. The VISIT group will repeat for each PATIENT group involved in the activity and therefore the message. CWE CWE.1:X000-0*
CWE.2:Inventory
CWE.3:LN
CWE.9: INV (MIM code for Inventory)
 
ORDER_OBSERVATION Group
OBR Segment
hl7:OBR.4 Required - LOINC code for Observation or set of Observations that are being requested/reportedUniversal Identifier CWE CWE.1:X000-0*
CWE.2:Individual Sighting
CWE.3:LN
OBSERVATION group
OBX Segment
hl7:OBX.2 Required - Datatype of value in OBX.5 OR hl7:CWE if OBX.8 is used and OBX.5 is not sent String CWE
hl7:OBX.3 Required - Observation Identifier CWE CWE.1:X000-0*
CWE.2:Individual Sighting
CWE.3:LN
hl7:OBX.4 Required - Observation Sub-Id OG OG.1:1
hl7:OBX.5 Required - Observation "Result" CWE (from OBX.2) CWE.1: 52101004
CWE.2: Present (qualifier value)
CWE.3: SCT
hl7:OBX.11 Required - Observation Results Status - should always be F for Final String F
hl7:OBX.14 Required - Date/Time Of The Observation DTM 20240403000000-0500
  *placeholder for codes being developed