`4F„2‡„MSH0\Ec:\tempHL7 CPlusPlus2*0‹;v<â@#7ƒg ÿÿÿÿÿÿÿÿ#7ƒg|~FR#7ƒg^Sÿÿÿÿ#7ƒg~Tÿÿÿÿ ~HL7„Û•#IÓ¥®  s cð•š« @—ûM°mÎY4F„V6&‡AckÿÿÿÿE53TE53T9'MSH52’Field Separatorc”STCb3ValueString52’Encoding Characters52’Sending Applicationc”EICb3Entity IdentifierCb3 Namespace IDc”ISCb3Value#Coded value for user-defined tablesCb3 Universal IDCb3Universal ID Typec”IDCb3IDCoded values for HL7 tablesEntity Identifier52’Sending Facility 52’Receiving Application 52’Receiving Facility 52’Date/Time of Messagec”DTCb3Value‰TrDateDateDate52’Security52’ Message Typec”CM_MSHCb3EventCb3TypeMSH Event-Type Composite52’Message Control ID52’ Processing IDc”PTCb3Processing TypeCb3Processing ModeProcessing Type52’ Version ID52’Sequence Numberc”NMCb3ValueNumeric52’Continuation Pointer52’Accept Acknowledgement Type52’ Application Acknowledgement Type52’ Country Code52’ Character Set52’Principal Language of Messagec”CECb3 IdentifierCb3TextCb3Name of coding systemCb3Alternate IdentifierCb3Alternate TextCb3Name of Coding System Coded ElementMessage HeaderE53T9'MSA52’Acknowledgement Code52’Message Control ID52’ Text Message52’Expected Sequence Number%52’Delayed Acknowledgement Type52’Error Condition-52’Field7c” UndefinedMessage AcknowledgementMessageACK™x#AckAcknowledgmentY4F„V6&‡DefaultÿÿÿÿE53TE53TMessage?DefaultDefault Message  c”TSCb3Value‰Tr Time StampDate Time stamp %-c”XCNCb3 ID NumberCb3 Family NameCb3 Given NameCb3Middle Initial or NameCb3SuffixCb3PrefixCb3DegreeCb3 Source Table Cb3Assigning authorityc”HDCb3 Namespace Cb3 Universal IDCb3 Universal IDHierarchic DesignatorCb3Name type codeCb3Identifier check digitCb3'Code identifying the check digit schemeCb3EmployedCb3Identifier type code Cb3Assigning FacilityN%Extended composite ID number and nameNc”SICb3Value Sequence IDc”CXCb3IDCb3 Check DigitCb30Code Identifying the check digit scheme employedCb3Assigning AuthorityNCb3Identifier Type Code Cb3Assigning FacilityN&Extended composite ID with check digitc”XPNCb3 Family NameCb3 Given NameCb3Middle Initial or NameCb3SuffixCb3PrefixCb3DegreeCb3Name Type CodeExtended person namec”XAD Cb3Street AddressCb3Other DesignationCb3CityCb3StateCb3Zip or postal codeCb3CountryCb3 Address typeCb3Other geographic designationCb3Country/parish code Cb3 Census Tract Extended Addressc”XTN Cb3NumberCb3Telecommunications use codeCb3!Telecommunications equipment typeCb3 Email AddressCb3 Country Code%Cb3Area/City Code%Cb3 Phone Number%Cb3 Extension%Cb3Any Text"Extended telecommunications numberc”DLNCb3License NumberCb3Issuing province, country Cb3Expiration DateDriver's License Numberc”XONCb3Organization NameCb3Organization name type code Cb3 ID Number%Cb3 Check Digit%Cb3 Code Identifying the Check DigitCb3Assigning AuthorityNCb3Identifier Type Code Cb3Assigned FacilityN%Extended composite name and ID numberc”JCCCb3Job code Cb3 Job class Job code/classc”PL Cb3 Point of Care Cb3Room Cb3Bed Cb3FacilityNCb3Location Status Cb3Person Location Type Cb3Building Cb3Floor Cb3Location DescriptionPerson locationc”FCCb3Financial classCb3Effective dateAFinancial classc”CMCb3Field1Cb3Field2Cb3Field3Cb3Field4Cb3Field5Cb3Field6Composite - discouragedc”CPCb3Pricec”MOCb3Quantity%Cb3 DenominationMoneyCb3 Price TypeCb3 From Value%Cb3To Value%Cb3 Range Units-Cb3 Range TypeComposite Price¤=9'EVN52’Event Type Code52’Recorded Date/TimeA52’Date/Time Planned EventA52’Event Reason Code 52’ Operator IDD52’Event OccurredA Event Type9'PID52’ Set ID - PIDX52’Patient ID (External ID)Z52’Patient ID (Internal ID)Z52’Alternate Patient ID - PIDZ52’ Patient Namea52’Mother's Maiden Namea52’Date/Time of Birth52’Sex 52’ Patient Aliasa52’Race 52’Patient Addressi52’ County Code 52’Phone Number - Homet52’Phone Number - Businesst52’Primary Language-52’Marital Status 52’Religion 52’Patient Account NumberZ52’SSN Number - Patient52’Driver's Licence Number-Patient~52’Mother's IdentifierZ52’ Ethnic Group 52’ Birth Place52’Multiple Birth Indicator52’ Birth Order%52’ Citizenship 52’Veterans Military Status-52’ Nationalty-52’Patient Death Date and TimeA52’Patient Death IndicatorPatient Identification9'PD1 52’Living Dependency 52’Living Arrangement 52’Patient Primary Facility‚52’+Patient Primary Care Provider Name & ID No.D52’Student Indicator 52’Handicap 52’ Living Will 52’ Organ Donor 52’ Separate Bill52’Duplicate PatientZ52’Publicity Indicator-52’Protection IndicatorPatient Demographic9'NK1%52’ Set ID - NK1X52’Namea52’ Relationship-52’Addressi52’ Phone Numbert52’Business Phone Numbert52’ Contact Role-52’ Start Date52’End Date52’(Next of Kin/Associated Parties Job Title52’-Next of Kin/Associated Parties Job Code/Class‹52’.Next of Kin/Associated Parties Employee NumberZ52’Organization Name-NK1‚52’Marital Status 52’Sex 52’Date/Time of BirthA52’Living Dependency 52’Ambulatory Status 52’ Citizenship 52’Primary Language-52’Living Arrangement 52’Publicity Indicator-52’Protection Indicator52’Student Indicator 52’Religion 52’Mother’s Maiden Namea52’ Nationality-52’ Ethnic Group 52’Contact Reason-52’Contact Person’s Namea52’!Contact Person’s Telephone Numbert52’Contact Person’s Addressi52’*Next of Kin/Associated Party’s IdentifiersZ52’ Job Status 52’Race 52’Handicap 52’%Contact Person Social Security NumberNext of Kin/Associated Parties9'PV1452’ Set ID - PV1X52’ Patient Class 52’Assigned Patient LocationŽ52’Admission Type 52’Preadmit NumberZ52’Prior Patient LocationŽ52’Attending DoctorD52’Referring DoctorD52’Consulting DoctorD52’Hospital Service 52’Temporary LocationŽ52’Preadmit Test Indicator 52’Readmission Indicator 52’ Admit Source 52’Ambulatory Status 52’ VIP Indicator 52’Admitting DoctorD52’ Patient Type 52’ Visit NumberZ52’Financial Class˜52’Charge Price Indicator 52’ Courtesy Code 52’ Credit Rating 52’ Contract Code 52’Contract Effective Date52’Contract Amount%52’Contract Period%52’ Interest Code 52’Transfer to Bad Debt Code 52’Transfer to Bad Debt Date52’Bad Debt Agency Code 52’Bad Debt Transfer Amount%52’Bad Debt Recovery Amount%52’Delete Account Indicator 52’Delete Account Date52’Discharge Disposition 52’Discharged to Location›52’ Diet Type 52’Servicing Facility 52’ Bed Status 52’Account Status 52’Pending LocationŽ52’Prior Temporary LocationŽ52’Admit Date/TimeA52’Discharge Date/TimeA52’Current Patient Balance%52’ Total Charges%52’Total Adjustments%52’Total Payments%52’Alternate Visit IDZ52’Visit Indicator 52’Other Healthcare ProviderD Patient Visit9'PV2%52’Prior Pending LocationŽ52’Accommodation Code-52’ Admit Reason-52’Transfer Reason-52’Patient Valuables52’Patient Valuables Location52’Visit User Code 52’Expected Admit Date/TimeA52’Expected Discharge Date/TimeA52’"Estimated Length of Inpatient Stay%52’Actual Length of Inpatient Stay%52’Visit Description52’Referral Source CodeD52’Previous Service Date52’$Employment Illness Related Indicator52’Purge Status Code 52’Purge Status Date52’Special Program Code 52’Retention Indicator52’"Expected Number of Insurance Plans%52’Visit Publicity Code 52’Visit Protection Indicator52’Clinic Organization Name‚52’Patient Status Code 52’Visit Priority Code 52’Previous Treatment Date52’Expected Discharge Disposition 52’Signature on File Date52’First Similar Illness Date52’Patient Charge Adjustment Code 52’Recurring Service Code 52’Billing Media Code52’Expected Surgery Date & TimeA52’Military Partnership Code52’Military Non-Availabiltiy Code52’Newborn Baby Indicator52’Baby Detained Indicator&Patient Visit - Additional Information9'DB152’ Set ID - DB1X52’Disabled Person Code 52’Disabled Person IdentifierZ52’Disabled Indicator52’Disability Start Date52’Disability End Date52’Disability Return to Work Date52’Disability Unable to Work Date Disability9'OBX52’ Set ID - OBXX52’ Value Type52’Observation Identifier-52’Observation Sub-ID52’Observation Value52’Units-52’References Range52’Abnormal Flags52’ Probability%52’Nature of Abnormal Test52’Observ Result Status52’Date Last Obs Normal ValuesA52’User Defined Access Checks52’Date/Time of the ObservationA52’ Producer's ID-52’Responsible ObserverD52’Observation Method-Observation/Result9'AL152’ Set ID - AL1X52’ Allergy Type 52’"Allergy Code/Mnemonic/ Description-52’Allergy Severity 52’Allergy Reaction52’Identification DatePatient Allergy Information9'DG152’ Set ID - DG1X52’Diagnosis Coding Method52’Diagnosis Code-52’Diagnosis Description52’Diagnosis Date/TimeA52’Diagnosis Type 52’Major Diagnostic Category-52’Diagnostic Related Group-52’DRG Approval Indicator52’DRG Grouper Review Code 52’ Outlier Type-52’ Outlier Days%52’ Outlier Cost¢52’Grouper Version and Type52’Diagnosis Priority%52’Diagnosing ClinicianD52’Diagnosis Classification 52’Confidential Indicator52’Attestation Date/TimeA Diagnosis9'DRG 52’Diagnostic Related Group-52’DRG Assigned Date/TimeA52’DRG Approval Indicator52’DRG Grouper Review Code 52’ Outlier Type-52’ Outlier Days%52’ Outlier Cost¢52’ DRG Payor 52’Outlier Reimbursement¢52’Confidential IndicatorDiagnosis Related Group9'PR152’ Set ID - PR1X52’Procedure Coding Method 52’Procedure Code-52’Procedure Description52’Procedure Date/TimeA52’Procedure Functional Type 52’Procedure Minutes%52’AnesthesiologistD52’Anesthesia Code 52’Anesthesia Minutes%52’SurgeonD52’Procedure PractitionerD52’ Consent Code-52’Procedure Priority%52’Associated Diagnosis Code- Procedures9'ROL52’Role Instance ID 52’ Action Code52’Role-52’ Role PersonD52’Role Begin Date/TimeA52’Role End Date/TimeA52’ Role Duration-52’Role Action Reason-Role9'GT1752’ Set ID - GT1X52’Guarantor NumberZ52’Guarantor Namea52’Guarantor Spouse Namea52’Guarantor Addressi52’Guarantor Ph Num- Homet52’Guarantor Ph Num-Businesst52’Guarantor Date/Time of BirthA52’ Guarantor Sex 52’Guarantor Type 52’Guarantor Relationship 52’ Guarantor SSN52’Guarantor Date - Begin52’Guarantor Date - End52’Guarantor Priority%52’Guarantor Employer Namea52’Guarantor Employer Addressi52’Guarantor Employer Phone Numbert52’Guarantor Employee ID NumberZ52’Guarantor Employment Status 52’Guarantor Organization Name‚52’Guarantor Billing Hold Flag52’Guarantor Credit Rating Code-52’Guarantor Death Date And TimeA52’Guarantor Death Flag52’ Guarantor Charge Adjustment Code-52’!Guarantor Household Annual Income¢52’Guarantor Household Size%52’Guarantor Employer ID NumberZ52’Guarantor Marital Status Code 52’Guarantor Hire Effective Date52’Guarantor Employment Stop Date52’Living Dependency 52’Ambulatory Status 52’ Citizenship 52’Primary Language-52’Living Arrangement 52’Publicity Indicator-52’Protection Indicator52’Student Indicator 52’Religion 52’Mother’s Maiden Namea52’ Nationality-52’ Ethnic Group 52’Contact Person's Namea52’!Contact Person’s Telephone Numbert52’Contact Reason-52’Contact Relationship 52’ Job Title52’Job Code/Class‹52’&Guarantor Employer's Organization Name‚52’Handicap 52’ Job Status 52’Guarantor Financial Class˜52’Guarantor Race Guarantor9'IN1152’ Set ID - IN1X52’Insurance Plan ID-52’Insurance Company IDZ52’Insurance Company Name‚52’Insurance Company Addressi52’Insurance Co. Contact Persona52’Insurance Co Phone Numbert52’ Group Number52’ Group Name‚52’Insured's Group Emp IDZ52’Insured's Group Emp Name‚52’Plan Effective Date52’Plan Expiration Date52’Authorization Information›52’ Plan Type 52’Name of Insureda52’!Insured's Relationship to Patient 52’Insured's Date of BirthA52’Insured's Addressi52’Assignment of Benefits 52’Coordination of Benefits 52’Coord of Ben. Priority52’Notice of Admission Flag52’Notice of Admission Date52’Rpt of Eligibility Flag52’Rpt of Eligibility Date52’Release Information Code 52’Pre-Admit Cert (PAC)52’Verification Date/TimeA52’Verification ByD52’Type of Agreement Code 52’Billing Status 52’Lifetime Reserve Days%52’Delay Before L. R. Day%52’Company Plan Code 52’ Policy Number52’Policy Deductible¢52’Policy Limit - Amount¢52’Policy Limit - Days%52’Room Rate - Semi-Private¢52’Room Rate - Private¢52’Insured's Employment Status-52’ Insured's Sex 52’Insured's Employer Addressi52’Verification Status52’Prior Insurance Plan ID 52’ Coverage Type 52’Handicap 52’Insured's ID NumberZ Insurance9'IN2H52’Insured's Employee IDZ52’ Insured's Social Security Number52’Insured's Employer NameD52’Employer Information Data 52’Mail Claim Party 52’Medicare Health Ins Card Number52’Medicaid Case Namea52’Medicaid Case Number52’Champus Sponsor Namea52’Champus ID Number52’Dependent of Champus Recipient-52’Champus Organization52’Champus Station52’Champus Service 52’Champus Rank/Grade 52’Champus Status 52’Champus Retire Date52’Champus Non-Avail Cert on File52’ Baby Coverage52’Combine Baby Bill52’Blood Deductible52’Special Coverage Approval Namea52’Special Coverage Approval Title52’Non-Covered Insurance Code 52’Payor IDZ52’Payor Subscriber IDZ52’Eligibility Source 52’Room Coverage Type/Amount›52’Policy Type/Amount›52’Daily Deductible›52’Living Dependency 52’Ambulatory Status 52’ Citizenship 52’Primary Language-52’Living Arrangement 52’Publicity Indicator-52’Protection Indicator52’Student Indicator 52’Religion 52’Mother’s Maiden Namea52’ Nationality-52’ Ethnic Group 52’Marital Status 52’Insured's Employment Start Date52’Insured's Employment Stop Date52’ Job Title52’Job Code/Class‹52’ Job Status 52’Employer Contact Person Namea52’$Employer Contact Person Phone Numbert52’Employer Contact Reason 52’Insured’s Contact Person’s Namea52’)Insured’s Contact Person Telephone Numbert52’Insured’s Contact Person Reason 52’&Relationship To The Patient Start Date52’%Relationship To The Patient Stop Date52’Insurance Co. Contact Reason 52’!Insurance Co Contact Phone Numbert52’ Policy Scope 52’ Policy Source 52’Patient Member NumberZ52’#Guarantor’s Relationship To Insured 52’!Insured’s Telephone Number - Homet52’#Insured’s Employer Telephone Numbert52’Military Handicapped Program-52’ Suspend Flag52’Copay Limit Flag52’Stoploss Limit Flag52’ Insured Organization Name And ID‚52’)Insured Employer Organization Name And ID‚52’Race 52’$HCFA Patient Relationship to Insured- Insurance Additional Information9'IN352’ Set ID - IN3X52’Certification NumberZ52’ Certified ByD52’Certification Required52’Penalty›52’Certification Date/TimeA52’Certification Modify Date/TimeA52’OperatorD52’Certification Begin Date52’Certification End Date52’Days›52’Non-Concur Code/Description-52’Non-Concur Effective Date/TimeA52’Physician ReviewerD52’Certification Contact52’"Certification Contact Phone Numbert52’ Appeal Reason-52’Certification Agency-52’!Certification Agency Phone Numbert52’Pre-Certification Req/Window›52’ Case Manager52’Second Opinion Date52’Second Opinion Status 52’%Second Opinion Documentation Received 52’Second Opinion PhysicianD/Insurance Additional Information, certification9'ACC52’Accident Date/TimeA52’ Accident Code-52’Accident Location52’Auto Accident State-52’Accident Job Related Indicator52’Accident Death IndicatorAccident9'UB152’ Set ID - UB1X52’Blood Deductible (43)%52’Blood Furnished-Pints Of (40)%52’Blood Replaced-Pints (41)%52’Blood Not Replaced-Pints(42)%52’Co-Insurance Days (25)%52’Condition Code (35-39) 52’Covered Days (23)%52’Non Covered Days (24)%52’Value Amount & Code (46-49)›52’Number Of Grace Days (90)%52’Spec Program Indicator (44)-52’PSRO/UR Approval Indicator (87)-52’PSRO/UR Approved Stay-Fm (88)52’PSRO/UR Approved Stay-To (89)52’Occurrence (28-32)›52’Occurrence Span (33)-52’Occur Span Start Date(33)52’Occur Span End Date (33)52’UB-82 Locator 252’UB-82 Locator 952’UB-82 Locator 2752’UB-82 Locator 45 UB82 Data9'UB252’ Set ID - UB2X52’Co-Insurance Days (9)52’Condition Code (24-30) 52’Covered Days (7)52’Non-Covered Days (8)52’Value Amount & Code ›52’Occurrence Code & Date (32-35)›52’Occurrence Span Code/Dates (36)›52’UB92 Locator 2 (State)52’UB92 Locator 11 (State)52’UB92 Locator 31 (National)52’Document Control Number52’UB92 Locator 49 (National)52’UB92 Locator 56 (State)52’UB92 Locator 57 (National)52’UB92 Locator 78 (State)52’Special Visit Count% UB92 Data59'ERR52’Error Code and Location›Error9'ZAA9' Segment249'MRG52’Prior Patient ID - InternalZ52’Prior Alternate Patient IDZ52’Prior Patient Account NumberZ52’Prior Patient ID - ExternalZ52’Prior Visit NumberZ52’Prior Alternate Visit IDZ52’Prior Patient NameaMerge Patient InformationCMPACIFOKE7HGJJFJHJ;C?HEKM>MSHvalue ='ACME Lab Sys'ReceivingApplication = valuevalue = 'Endoscopy Lab'value = ReceivingApplicationvalue = 'A' + MessageControlIdMessageControlId = value value='P'value = VersionVersion = value'value = strip_leading_chars("0", value)'value = strip_leading_chars("0", value)log('Patient ID before stripping leading zeros = ' + value) value = strip_leading_chars('0', value) log('Patient ID afterwards = ' + value) value = strip_chars("-", value) value = 'AA'value = MessageControlIddefaultÿÿÿÿACK™x#MSHÿÿÿÿ??UTF8ASCII­if value[0:3] == 'MSH': set_separator_char(environment, 1, value[3]) set_separator_char(environment, 2, value[4]) set_separator_char(environment, 3, value[5]) .ASCIISTANDARD %4% 71Hä