none
Map - xml structuring issue

    Question

  • Hello Microsoft experts !!

    Please see attached are 3 xml's  (Input, RecevingOutput, ExpectedOutput).

    If you see input, OBR segment has following 2 OBX segments. 

    Then 2nd OBR has following 2 segments of OBX.... So output should be coming accordingly.

    But the output is coming weird, under 1st OBR I am receiving all OBX segments (all 4 OBX segments together).

    2nd OBR is coming with same repeatation of all segments (again all 4 OBX Segments together).

    How can I fix this ?

    • I did direct map link from Source OBR to MultiRecs node (if you see output file).
    • Set looping functoid from OBR to MultiRecs and looping functoid from OBX to Multirecs. Didnt work

    Input XML

    <ns0:Root xmlns:ns0="http://schemas.microsoft.com/BizTalk/2003/aggschema">
      <InputMessagePart_0>
        <ns0:ORU_R01_231_GLO_DEF xmlns:ns0="http://microsoft.com/HealthCare/HL7/2X"><PID_PatientIdentificationSegment><PID_1_SetIdPid>1</PID_1_SetIdPid><PID_2_PatientId><CX_0_Id>181466</CX_0_Id></PID_2_PatientId><PID_3_PatientIdentifierList><CX_0_Id>BC699403</CX_0_Id></PID_3_PatientIdentifierList><PID_4_AlternatePatientIdPid><CX_0_Id>NONE</CX_0_Id></PID_4_AlternatePatientIdPid><PID_5_PatientName><XPN_0_FamilyLastName><XPN_0_0_FamilyName>LOVE</XPN_0_0_FamilyName></XPN_0_FamilyLastName><XPN_1_GivenName>MONIQUE</XPN_1_GivenName><XPN_2_MiddleInitialOrName></XPN_2_MiddleInitialOrName></PID_5_PatientName><PID_6_MotherSMaidenName><XPN_0_FamilyLastName><XPN_0_0_FamilyName></XPN_0_0_FamilyName></XPN_0_FamilyLastName></PID_6_MotherSMaidenName><PID_7_DateTimeOfBirth><TS_0_TimeOfAnEvent>19880621</TS_0_TimeOfAnEvent></PID_7_DateTimeOfBirth><PID_8_Sex>F</PID_8_Sex><PID_9_PatientAlias><XPN_0_FamilyLastName><XPN_0_0_FamilyName></XPN_0_0_FamilyName></XPN_0_FamilyLastName></PID_9_PatientAlias><PID_10_Race><CE_0005_0_Identifier></CE_0005_0_Identifier></PID_10_Race><PID_11_PatientAddress><XAD_0_StreetAddress>2204 COLLIER AVENUE</XAD_0_StreetAddress><XAD_1_OtherDesignation>APT 6H</XAD_1_OtherDesignation><XAD_2_City>FAR ROCKAWAY</XAD_2_City><XAD_3_StateOrProvince>NY</XAD_3_StateOrProvince><XAD_4_ZipOrPostalCode>11691</XAD_4_ZipOrPostalCode></PID_11_PatientAddress><PID_12_CountyCode></PID_12_CountyCode><PID_13_PhoneNumberHome><XTN_0_9999999999X99999CAnyText></XTN_0_9999999999X99999CAnyText><XTN_1_TelecommunicationUseCode></XTN_1_TelecommunicationUseCode><XTN_2_TelecommunicationEquipmentTypeId></XTN_2_TelecommunicationEquipmentTypeId><XTN_3_EmailAddress></XTN_3_EmailAddress><XTN_4_CountryCode></XTN_4_CountryCode><XTN_5_AreaCityCode></XTN_5_AreaCityCode><XTN_6_PhoneNumber></XTN_6_PhoneNumber></PID_13_PhoneNumberHome><PID_14_PhoneNumberBusiness><XTN_0_9999999999X99999CAnyText></XTN_0_9999999999X99999CAnyText></PID_14_PhoneNumberBusiness><PID_15_PrimaryLanguage><CE_0296_0_Identifier></CE_0296_0_Identifier></PID_15_PrimaryLanguage><PID_16_MaritalStatus><CE_0002_0_Identifier></CE_0002_0_Identifier></PID_16_MaritalStatus><PID_17_Religion><CE_0006_0_Identifier></CE_0006_0_Identifier></PID_17_Religion><PID_18_PatientAccountNumber><CX_0_Id></CX_0_Id></PID_18_PatientAccountNumber><PID_19_SsnNumberPatient></PID_19_SsnNumberPatient></PID_PatientIdentificationSegment><IN1_InsuranceSegment><IN1_1_SetIdIn1>1</IN1_1_SetIdIn1><IN1_2_InsurancePlanId><CE_0072_0_Identifier>6609</CE_0072_0_Identifier></IN1_2_InsurancePlanId><IN1_3_InsuranceCompanyId><CX_0_Id></CX_0_Id></IN1_3_InsuranceCompanyId><IN1_4_InsuranceCompanyName><XON_0_OrganizationName></XON_0_OrganizationName></IN1_4_InsuranceCompanyName><IN1_5_InsuranceCompanyAddress><XAD_0_StreetAddress></XAD_0_StreetAddress></IN1_5_InsuranceCompanyAddress><IN1_6_InsuranceCoContactPerson><XPN_0_FamilyLastName><XPN_0_0_FamilyName></XPN_0_0_FamilyName></XPN_0_FamilyLastName></IN1_6_InsuranceCoContactPerson><IN1_7_InsuranceCoPhoneNumber><XTN_0_9999999999X99999CAnyText></XTN_0_9999999999X99999CAnyText></IN1_7_InsuranceCoPhoneNumber><IN1_8_GroupNumber></IN1_8_GroupNumber><IN1_9_GroupName><XON_0_OrganizationName></XON_0_OrganizationName></IN1_9_GroupName><IN1_10_InsuredSGroupEmpId><CX_0_Id></CX_0_Id></IN1_10_InsuredSGroupEmpId><IN1_11_InsuredSGroupEmpName><XON_0_OrganizationName></XON_0_OrganizationName></IN1_11_InsuredSGroupEmpName><IN1_12_PlanEffectiveDate></IN1_12_PlanEffectiveDate><IN1_13_PlanExpirationDate></IN1_13_PlanExpirationDate><IN1_14_AuthorizationInformation><AUI_0_AuthorizationNumber></AUI_0_AuthorizationNumber></IN1_14_AuthorizationInformation><IN1_15_PlanType></IN1_15_PlanType><IN1_16_NameOfInsured><XPN_0_FamilyLastName><XPN_0_0_FamilyName></XPN_0_0_FamilyName></XPN_0_FamilyLastName></IN1_16_NameOfInsured><IN1_17_InsuredSRelationshipToPatient><CE_0063_0_Identifier></CE_0063_0_Identifier></IN1_17_InsuredSRelationshipToPatient><IN1_18_InsuredSDateOfBirth><TS_0_TimeOfAnEvent></TS_0_TimeOfAnEvent></IN1_18_InsuredSDateOfBirth><IN1_19_InsuredSAddress><XAD_0_StreetAddress></XAD_0_StreetAddress></IN1_19_InsuredSAddress><IN1_20_AssignmentOfBenefits></IN1_20_AssignmentOfBenefits><IN1_21_CoordinationOfBenefits></IN1_21_CoordinationOfBenefits><IN1_22_CoordOfBenPriority></IN1_22_CoordOfBenPriority><IN1_23_NoticeOfAdmissionFlag></IN1_23_NoticeOfAdmissionFlag><IN1_24_NoticeOfAdmissionDate></IN1_24_NoticeOfAdmissionDate><IN1_25_ReportOfEligibilityFlag></IN1_25_ReportOfEligibilityFlag><IN1_26_ReportOfEligibilityDate></IN1_26_ReportOfEligibilityDate><IN1_27_ReleaseInformationCode></IN1_27_ReleaseInformationCode><IN1_28_PreAdmitCertPac></IN1_28_PreAdmitCertPac><IN1_29_VerificationDateTime><TS_0_TimeOfAnEvent></TS_0_TimeOfAnEvent></IN1_29_VerificationDateTime><IN1_30_VerificationBy><XCN_0_IdNumberSt></XCN_0_IdNumberSt></IN1_30_VerificationBy><IN1_31_TypeOfAgreementCode></IN1_31_TypeOfAgreementCode><IN1_32_BillingStatus></IN1_32_BillingStatus><IN1_33_LifetimeReserveDays></IN1_33_LifetimeReserveDays><IN1_34_DelayBeforeLRDay></IN1_34_DelayBeforeLRDay><IN1_35_CompanyPlanCode></IN1_35_CompanyPlanCode><IN1_36_PolicyNumber>XT90223Z</IN1_36_PolicyNumber></IN1_InsuranceSegment><ORC_CommonOrderSegment><ORC_1_OrderControl></ORC_1_OrderControl><ORC_2_PlacerOrderNumber><EI_0_EntityIdentifier></EI_0_EntityIdentifier></ORC_2_PlacerOrderNumber><ORC_3_FillerOrderNumber><EI_0_EntityIdentifier>BC699403</EI_0_EntityIdentifier></ORC_3_FillerOrderNumber><ORC_4_PlacerGroupNumber><EI_0_EntityIdentifier></EI_0_EntityIdentifier></ORC_4_PlacerGroupNumber><ORC_5_OrderStatus></ORC_5_OrderStatus><ORC_6_ResponseFlag></ORC_6_ResponseFlag><ORC_7_QuantityTiming><TQ_0_Quantity><TQ_0_0_Quantity></TQ_0_0_Quantity></TQ_0_Quantity></ORC_7_QuantityTiming><ORC_8_Parent><EIP_0_ParentSPlacerOrderNumber><EIP_0_0_EntityIdentifier></EIP_0_0_EntityIdentifier></EIP_0_ParentSPlacerOrderNumber></ORC_8_Parent><ORC_9_DateTimeOfTransaction><TS_0_TimeOfAnEvent>20150201</TS_0_TimeOfAnEvent></ORC_9_DateTimeOfTransaction><ORC_10_EnteredBy><XCN_0_IdNumberSt></XCN_0_IdNumberSt></ORC_10_EnteredBy><ORC_11_VerifiedBy><XCN_0_IdNumberSt></XCN_0_IdNumberSt></ORC_11_VerifiedBy><ORC_12_OrderingProvider><XCN_0_IdNumberSt></XCN_0_IdNumberSt><XCN_1_FamilyLastName><XCN_1_0_FamilyName>UDOMRICE</XCN_1_0_FamilyName></XCN_1_FamilyLastName><XCN_2_GivenName>IZUKA</XCN_2_GivenName><XCN_3_MiddleInitialOrName>P</XCN_3_MiddleInitialOrName><XCN_4_SuffixEGJrOrIii></XCN_4_SuffixEGJrOrIii><XCN_5_PrefixEGDr></XCN_5_PrefixEGDr><XCN_6_DegreeEGMd></XCN_6_DegreeEGMd><XCN_7_SourceTable>UPIN</XCN_7_SourceTable></ORC_12_OrderingProvider><ORC_12_OrderingProvider><XCN_0_IdNumberSt></XCN_0_IdNumberSt><XCN_1_FamilyLastName><XCN_1_0_FamilyName>UDOMRICE</XCN_1_0_FamilyName></XCN_1_FamilyLastName><XCN_2_GivenName>IZUKA</XCN_2_GivenName><XCN_3_MiddleInitialOrName>P</XCN_3_MiddleInitialOrName><XCN_4_SuffixEGJrOrIii></XCN_4_SuffixEGJrOrIii><XCN_5_PrefixEGDr></XCN_5_PrefixEGDr><XCN_6_DegreeEGMd></XCN_6_DegreeEGMd><XCN_7_SourceTable>NPI</XCN_7_SourceTable></ORC_12_OrderingProvider><ORC_13_EntererSLocation><PL_0_PointOfCare></PL_0_PointOfCare></ORC_13_EntererSLocation><ORC_14_CallBackPhoneNumber><XTN_0_9999999999X99999CAnyText></XTN_0_9999999999X99999CAnyText></ORC_14_CallBackPhoneNumber><ORC_15_OrderEffectiveDateTime><TS_0_TimeOfAnEvent></TS_0_TimeOfAnEvent></ORC_15_OrderEffectiveDateTime><ORC_16_OrderControlCodeReason><CE_0_Identifier></CE_0_Identifier></ORC_16_OrderControlCodeReason><ORC_17_EnteringOrganization><CE_0_Identifier></CE_0_Identifier></ORC_17_EnteringOrganization><ORC_18_EnteringDevice><CE_0_Identifier></CE_0_Identifier></ORC_18_EnteringDevice><ORC_19_ActionBy><XCN_0_IdNumberSt></XCN_0_IdNumberSt></ORC_19_ActionBy><ORC_20_AdvancedBeneficiaryNoticeCode><CE_0339_0_Identifier></CE_0339_0_Identifier></ORC_20_AdvancedBeneficiaryNoticeCode><ORC_21_OrderingFacilityName><XON_0_OrganizationName>JOSEPH P. ADDABBO FAMILY H.C.</XON_0_OrganizationName><XON_1_OrganizationNameTypeCode>D</XON_1_OrganizationNameTypeCode><XON_2_IdNumberNm>T27176</XON_2_IdNumberNm></ORC_21_OrderingFacilityName><ORC_22_OrderingFacilityAddress><XAD_0_StreetAddress>SITE 1</XAD_0_StreetAddress><XAD_1_OtherDesignation>62-00 BEACH CHANNEL DRIVE</XAD_1_OtherDesignation><XAD_2_City>FAR ROCKAWAY</XAD_2_City><XAD_3_StateOrProvince>NY</XAD_3_StateOrProvince><XAD_4_ZipOrPostalCode>11692</XAD_4_ZipOrPostalCode></ORC_22_OrderingFacilityAddress><ORC_23_OrderingFacilityPhoneNumber><XTN_0_9999999999X99999CAnyText></XTN_0_9999999999X99999CAnyText><XTN_1_TelecommunicationUseCode></XTN_1_TelecommunicationUseCode><XTN_2_TelecommunicationEquipmentTypeId></XTN_2_TelecommunicationEquipmentTypeId><XTN_3_EmailAddress></XTN_3_EmailAddress><XTN_4_CountryCode></XTN_4_CountryCode><XTN_5_AreaCityCode>718</XTN_5_AreaCityCode><XTN_6_PhoneNumber>9457150</XTN_6_PhoneNumber></ORC_23_OrderingFacilityPhoneNumber><ORC_24_OrderingProviderAddress><XAD_0_StreetAddress></XAD_0_StreetAddress></ORC_24_OrderingProviderAddress></ORC_CommonOrderSegment><DG1_Diagnostics><DG1_1_SetIdDg1>1</DG1_1_SetIdDg1><DG1_2_DiagnosisCodingMethod>I09</DG1_2_DiagnosisCodingMethod><DG1_3_DiagnosisCodeDg1><CE_0051_0_Identifier>626.0</CE_0051_0_Identifier></DG1_3_DiagnosisCodeDg1></DG1_Diagnostics><DG1_Diagnostics><DG1_1_SetIdDg1>2</DG1_1_SetIdDg1><DG1_2_DiagnosisCodingMethod>I09</DG1_2_DiagnosisCodingMethod><DG1_3_DiagnosisCodeDg1><CE_0051_0_Identifier>V22.2</CE_0051_0_Identifier></DG1_3_DiagnosisCodeDg1></DG1_Diagnostics><DG1_Diagnostics><DG1_1_SetIdDg1>3</DG1_1_SetIdDg1><DG1_2_DiagnosisCodingMethod>I09</DG1_2_DiagnosisCodingMethod><DG1_3_DiagnosisCodeDg1><CE_0051_0_Identifier>V72.3.11</CE_0051_0_Identifier></DG1_3_DiagnosisCodeDg1></DG1_Diagnostics><OBR_ObservationRequestSegment><OBR_1_SetIdObr>1</OBR_1_SetIdObr><OBR_2_PlacerOrderNumber><EI_0_EntityIdentifier></EI_0_EntityIdentifier></OBR_2_PlacerOrderNumber><OBR_3_FillerOrderNumber><EI_0_EntityIdentifier>BC699403</EI_0_EntityIdentifier></OBR_3_FillerOrderNumber><OBR_4_UniversalServiceId><CE_0_Identifier>104497</CE_0_Identifier><CE_1_Text>GLUCOSE,1HR PP</CE_1_Text><CE_2_NameOfCodingSystem>L</CE_2_NameOfCodingSystem><CE_3_AlternateIdentifier>104497W</CE_3_AlternateIdentifier><CE_4_AlternateText></CE_4_AlternateText><CE_5_NameOfAlternateCodingSystem>L</CE_5_NameOfAlternateCodingSystem></OBR_4_UniversalServiceId><OBR_5_PriorityObr></OBR_5_PriorityObr><OBR_6_RequestedDateTime><TS_0_TimeOfAnEvent></TS_0_TimeOfAnEvent></OBR_6_RequestedDateTime><OBR_7_ObservationDateTime><TS_0_TimeOfAnEvent>20150131</TS_0_TimeOfAnEvent></OBR_7_ObservationDateTime><OBR_8_ObservationEndDateTime><TS_0_TimeOfAnEvent></TS_0_TimeOfAnEvent></OBR_8_ObservationEndDateTime><OBR_9_CollectionVolume><CQ_0_Quantity></CQ_0_Quantity></OBR_9_CollectionVolume><OBR_10_CollectorIdentifier><XCN_0_IdNumberSt></XCN_0_IdNumberSt></OBR_10_CollectorIdentifier><OBR_11_SpecimenActionCode></OBR_11_SpecimenActionCode><OBR_12_DangerCode><CE_0_Identifier></CE_0_Identifier></OBR_12_DangerCode><OBR_13_RelevantClinicalInfo></OBR_13_RelevantClinicalInfo><OBR_14_SpecimenReceivedDateTime><TS_0_TimeOfAnEvent></TS_0_TimeOfAnEvent></OBR_14_SpecimenReceivedDateTime><OBR_15_SpecimenSource><SPS_0_SpecimenSourceNameOrCode><SPS_0_0_Identifier></SPS_0_0_Identifier></SPS_0_SpecimenSourceNameOrCode></OBR_15_SpecimenSource><OBR_16_OrderingProvider><XCN_0_IdNumberSt></XCN_0_IdNumberSt><XCN_1_FamilyLastName><XCN_1_0_FamilyName>UDOMRICE</XCN_1_0_FamilyName></XCN_1_FamilyLastName><XCN_2_GivenName>IZUKA</XCN_2_GivenName><XCN_3_MiddleInitialOrName>P</XCN_3_MiddleInitialOrName><XCN_4_SuffixEGJrOrIii></XCN_4_SuffixEGJrOrIii><XCN_5_PrefixEGDr></XCN_5_PrefixEGDr><XCN_6_DegreeEGMd></XCN_6_DegreeEGMd><XCN_7_SourceTable>UPIN</XCN_7_SourceTable></OBR_16_OrderingProvider><OBR_16_OrderingProvider><XCN_0_IdNumberSt></XCN_0_IdNumberSt><XCN_1_FamilyLastName><XCN_1_0_FamilyName>UDOMRICE</XCN_1_0_FamilyName></XCN_1_FamilyLastName><XCN_2_GivenName>IZUKA</XCN_2_GivenName><XCN_3_MiddleInitialOrName>P</XCN_3_MiddleInitialOrName><XCN_4_SuffixEGJrOrIii></XCN_4_SuffixEGJrOrIii><XCN_5_PrefixEGDr></XCN_5_PrefixEGDr><XCN_6_DegreeEGMd></XCN_6_DegreeEGMd><XCN_7_SourceTable>NPI</XCN_7_SourceTable></OBR_16_OrderingProvider><OBR_17_OrderCallbackPhoneNumber><XTN_0_9999999999X99999CAnyText></XTN_0_9999999999X99999CAnyText></OBR_17_OrderCallbackPhoneNumber><OBR_18_PlacerField1></OBR_18_PlacerField1><OBR_19_PlacerField2></OBR_19_PlacerField2><OBR_20_FillerField1>TBR</OBR_20_FillerField1><OBR_21_FillerField2></OBR_21_FillerField2><OBR_22_ResultsRptStatusChngDateTime><TS_0_TimeOfAnEvent>201502010737</TS_0_TimeOfAnEvent></OBR_22_ResultsRptStatusChngDateTime><OBR_23_ChargeToPractice><MOC_0_DollarAmount><MOC_0_0_Quantity></MOC_0_0_Quantity></MOC_0_DollarAmount></OBR_23_ChargeToPractice><OBR_24_DiagnosticServSectId></OBR_24_DiagnosticServSectId><OBR_25_ResultStatus></OBR_25_ResultStatus><OBR_26_ParentResult><PRL_0_Obx3ObservationIdentifierOfParentResult><PRL_0_0_Identifier></PRL_0_0_Identifier></PRL_0_Obx3ObservationIdentifierOfParentResult></OBR_26_ParentResult><OBR_27_QuantityTiming><TQ_0_Quantity><TQ_0_0_Quantity></TQ_0_0_Quantity></TQ_0_Quantity></OBR_27_QuantityTiming><OBR_28_ResultCopiesTo><XCN_0_IdNumberSt></XCN_0_IdNumberSt></OBR_28_ResultCopiesTo><OBR_29_Parent><EIP_0_ParentSPlacerOrderNumber><EIP_0_0_EntityIdentifier></EIP_0_0_EntityIdentifier></EIP_0_ParentSPlacerOrderNumber></OBR_29_Parent><OBR_30_TransportationMode></OBR_30_TransportationMode><OBR_31_ReasonForStudy><CE_0_Identifier></CE_0_Identifier></OBR_31_ReasonForStudy><OBR_32_PrincipalResultInterpreter><NDL_0_Name><NDL_0_0_IdNumberSt></NDL_0_0_IdNumberSt></NDL_0_Name></OBR_32_PrincipalResultInterpreter><OBR_33_AssistantResultInterpreter><NDL_0_Name><NDL_0_0_IdNumberSt></NDL_0_0_IdNumberSt></NDL_0_Name></OBR_33_AssistantResultInterpreter><OBR_34_Technician><NDL_0_Name><NDL_0_0_IdNumberSt></NDL_0_0_IdNumberSt></NDL_0_Name></OBR_34_Technician><OBR_35_Transcriptionist><NDL_0_Name><NDL_0_0_IdNumberSt></NDL_0_0_IdNumberSt></NDL_0_Name></OBR_35_Transcriptionist><OBR_36_ScheduledDateTime><TS_0_TimeOfAnEvent></TS_0_TimeOfAnEvent></OBR_36_ScheduledDateTime><OBR_37_NumberOfSampleContainers></OBR_37_NumberOfSampleContainers><OBR_38_TransportLogisticsOfCollectedSample><CE_0_Identifier></CE_0_Identifier></OBR_38_TransportLogisticsOfCollectedSample><OBR_39_CollectorSComment><CE_0_Identifier></CE_0_Identifier></OBR_39_CollectorSComment><OBR_40_TransportArrangementResponsibility><CE_0_Identifier></CE_0_Identifier></OBR_40_TransportArrangementResponsibility><OBR_41_TransportArranged></OBR_41_TransportArranged><OBR_42_EscortRequired></OBR_42_EscortRequired><OBR_43_PlannedPatientTransportComment><CE_0_Identifier></CE_0_Identifier></OBR_43_PlannedPatientTransportComment><OBR_44_ProcedureCode><CE_0088_0_Identifier>82947</CE_0088_0_Identifier><CE_0088_1_Text></CE_0088_1_Text><CE_0088_2_NameOfCodingSystem>CPT</CE_0088_2_NameOfCodingSystem></OBR_44_ProcedureCode><OBR_45_ProcedureCodeModifier><CE_0340_0_Identifier></CE_0340_0_Identifier></OBR_45_ProcedureCodeModifier></OBR_ObservationRequestSegment><OBX_ObservationResultSegment><OBX_1_SetIdObx>1</OBX_1_SetIdObx><OBX_2_ValueType>NM</OBX_2_ValueType><OBX_3_ObservationIdentifier><CE_0_Identifier>10449-7</CE_0_Identifier><CE_1_Text></CE_1_Text><CE_2_NameOfCodingSystem>LOINC</CE_2_NameOfCodingSystem><CE_3_AlternateIdentifier>30104497</CE_3_AlternateIdentifier><CE_4_AlternateText>GLUCOSE,1HR PP</CE_4_AlternateText><CE_5_NameOfAlternateCodingSystem>L</CE_5_NameOfAlternateCodingSystem></OBX_3_ObservationIdentifier><OBX_4_ObservationSubId></OBX_4_ObservationSubId><OBX_5_ObservationValue>78</OBX_5_ObservationValue><OBX_6_Units><CE_0_Identifier>MG/DL</CE_0_Identifier></OBX_6_Units><OBX_7_ReferenceRange><RangeLow>65</RangeLow><RangeHigh>199</RangeHigh><RangeAlpha></RangeAlpha></OBX_7_ReferenceRange><OBX_8_AbnormalFlags></OBX_8_AbnormalFlags><OBX_9_Probability></OBX_9_Probability><OBX_10_NatureOfAbnormalTest></OBX_10_NatureOfAbnormalTest><OBX_11_ObservationResultStatus>F</OBX_11_ObservationResultStatus><OBX_12_DateLastObsNormalValues><TS_0_TimeOfAnEvent></TS_0_TimeOfAnEvent></OBX_12_DateLastObsNormalValues><OBX_13_UserDefinedAccessChecks></OBX_13_UserDefinedAccessChecks><OBX_14_DateTimeOfTheObservation><TS_0_TimeOfAnEvent>201502010737</TS_0_TimeOfAnEvent></OBX_14_DateTimeOfTheObservation><OBX_15_ProducerSId><CE_0_Identifier></CE_0_Identifier></OBX_15_ProducerSId><OBX_16_ResponsibleObserver><XCN_0_IdNumberSt></XCN_0_IdNumberSt></OBX_16_ResponsibleObserver><OBX_17_ObservationMethod><CE_0_Identifier></CE_0_Identifier></OBX_17_ObservationMethod></OBX_ObservationResultSegment><OBX_ObservationResultSegment><OBX_1_SetIdObx>1</OBX_1_SetIdObx><OBX_2_ValueType>NM</OBX_2_ValueType><OBX_3_ObservationIdentifier><CE_0_Identifier>10449-7</CE_0_Identifier><CE_1_Text></CE_1_Text><CE_2_NameOfCodingSystem>LOINC</CE_2_NameOfCodingSystem><CE_3_AlternateIdentifier>30104497</CE_3_AlternateIdentifier><CE_4_AlternateText>GLUCOSE,1HR PP</CE_4_AlternateText><CE_5_NameOfAlternateCodingSystem>L</CE_5_NameOfAlternateCodingSystem></OBX_3_ObservationIdentifier><OBX_4_ObservationSubId></OBX_4_ObservationSubId><OBX_5_ObservationValue>78</OBX_5_ObservationValue><OBX_6_Units><CE_0_Identifier>MG/DL</CE_0_Identifier></OBX_6_Units><OBX_7_ReferenceRange><RangeLow>65</RangeLow><RangeHigh>199</RangeHigh><RangeAlpha></RangeAlpha></OBX_7_ReferenceRange><OBX_8_AbnormalFlags></OBX_8_AbnormalFlags><OBX_9_Probability></OBX_9_Probability><OBX_10_NatureOfAbnormalTest></OBX_10_NatureOfAbnormalTest><OBX_11_ObservationResultStatus>F</OBX_11_ObservationResultStatus><OBX_12_DateLastObsNormalValues><TS_0_TimeOfAnEvent></TS_0_TimeOfAnEvent></OBX_12_DateLastObsNormalValues><OBX_13_UserDefinedAccessChecks></OBX_13_UserDefinedAccessChecks><OBX_14_DateTimeOfTheObservation><TS_0_TimeOfAnEvent>201502010737</TS_0_TimeOfAnEvent></OBX_14_DateTimeOfTheObservation><OBX_15_ProducerSId><CE_0_Identifier></CE_0_Identifier></OBX_15_ProducerSId><OBX_16_ResponsibleObserver><XCN_0_IdNumberSt></XCN_0_IdNumberSt></OBX_16_ResponsibleObserver><OBX_17_ObservationMethod><CE_0_Identifier></CE_0_Identifier></OBX_17_ObservationMethod></OBX_ObservationResultSegment>
        <OBR_ObservationRequestSegment><OBR_1_SetIdObr>1</OBR_1_SetIdObr><OBR_2_PlacerOrderNumber><EI_0_EntityIdentifier></EI_0_EntityIdentifier></OBR_2_PlacerOrderNumber><OBR_3_FillerOrderNumber><EI_0_EntityIdentifier>BC699403</EI_0_EntityIdentifier></OBR_3_FillerOrderNumber><OBR_4_UniversalServiceId><CE_0_Identifier>104497</CE_0_Identifier><CE_1_Text>GLUCOSE,1HR PP</CE_1_Text><CE_2_NameOfCodingSystem>L</CE_2_NameOfCodingSystem><CE_3_AlternateIdentifier>104497W</CE_3_AlternateIdentifier><CE_4_AlternateText></CE_4_AlternateText><CE_5_NameOfAlternateCodingSystem>L</CE_5_NameOfAlternateCodingSystem></OBR_4_UniversalServiceId><OBR_5_PriorityObr></OBR_5_PriorityObr><OBR_6_RequestedDateTime><TS_0_TimeOfAnEvent></TS_0_TimeOfAnEvent></OBR_6_RequestedDateTime><OBR_7_ObservationDateTime><TS_0_TimeOfAnEvent>20150131</TS_0_TimeOfAnEvent></OBR_7_ObservationDateTime><OBR_8_ObservationEndDateTime><TS_0_TimeOfAnEvent></TS_0_TimeOfAnEvent></OBR_8_ObservationEndDateTime><OBR_9_CollectionVolume><CQ_0_Quantity></CQ_0_Quantity></OBR_9_CollectionVolume><OBR_10_CollectorIdentifier><XCN_0_IdNumberSt></XCN_0_IdNumberSt></OBR_10_CollectorIdentifier><OBR_11_SpecimenActionCode></OBR_11_SpecimenActionCode><OBR_12_DangerCode><CE_0_Identifier></CE_0_Identifier></OBR_12_DangerCode><OBR_13_RelevantClinicalInfo></OBR_13_RelevantClinicalInfo><OBR_14_SpecimenReceivedDateTime><TS_0_TimeOfAnEvent></TS_0_TimeOfAnEvent></OBR_14_SpecimenReceivedDateTime><OBR_15_SpecimenSource><SPS_0_SpecimenSourceNameOrCode><SPS_0_0_Identifier></SPS_0_0_Identifier></SPS_0_SpecimenSourceNameOrCode></OBR_15_SpecimenSource><OBR_16_OrderingProvider><XCN_0_IdNumberSt></XCN_0_IdNumberSt><XCN_1_FamilyLastName><XCN_1_0_FamilyName>UDOMRICE</XCN_1_0_FamilyName></XCN_1_FamilyLastName><XCN_2_GivenName>IZUKA</XCN_2_GivenName><XCN_3_MiddleInitialOrName>P</XCN_3_MiddleInitialOrName><XCN_4_SuffixEGJrOrIii></XCN_4_SuffixEGJrOrIii><XCN_5_PrefixEGDr></XCN_5_PrefixEGDr><XCN_6_DegreeEGMd></XCN_6_DegreeEGMd><XCN_7_SourceTable>UPIN</XCN_7_SourceTable></OBR_16_OrderingProvider><OBR_16_OrderingProvider><XCN_0_IdNumberSt></XCN_0_IdNumberSt><XCN_1_FamilyLastName><XCN_1_0_FamilyName>UDOMRICE</XCN_1_0_FamilyName></XCN_1_FamilyLastName><XCN_2_GivenName>IZUKA</XCN_2_GivenName><XCN_3_MiddleInitialOrName>P</XCN_3_MiddleInitialOrName><XCN_4_SuffixEGJrOrIii></XCN_4_SuffixEGJrOrIii><XCN_5_PrefixEGDr></XCN_5_PrefixEGDr><XCN_6_DegreeEGMd></XCN_6_DegreeEGMd><XCN_7_SourceTable>NPI</XCN_7_SourceTable></OBR_16_OrderingProvider><OBR_17_OrderCallbackPhoneNumber><XTN_0_9999999999X99999CAnyText></XTN_0_9999999999X99999CAnyText></OBR_17_OrderCallbackPhoneNumber><OBR_18_PlacerField1></OBR_18_PlacerField1><OBR_19_PlacerField2></OBR_19_PlacerField2><OBR_20_FillerField1>TBR</OBR_20_FillerField1><OBR_21_FillerField2></OBR_21_FillerField2><OBR_22_ResultsRptStatusChngDateTime><TS_0_TimeOfAnEvent>201502010737</TS_0_TimeOfAnEvent></OBR_22_ResultsRptStatusChngDateTime><OBR_23_ChargeToPractice><MOC_0_DollarAmount><MOC_0_0_Quantity></MOC_0_0_Quantity></MOC_0_DollarAmount></OBR_23_ChargeToPractice><OBR_24_DiagnosticServSectId></OBR_24_DiagnosticServSectId><OBR_25_ResultStatus></OBR_25_ResultStatus><OBR_26_ParentResult><PRL_0_Obx3ObservationIdentifierOfParentResult><PRL_0_0_Identifier></PRL_0_0_Identifier></PRL_0_Obx3ObservationIdentifierOfParentResult></OBR_26_ParentResult><OBR_27_QuantityTiming><TQ_0_Quantity><TQ_0_0_Quantity></TQ_0_0_Quantity></TQ_0_Quantity></OBR_27_QuantityTiming><OBR_28_ResultCopiesTo><XCN_0_IdNumberSt></XCN_0_IdNumberSt></OBR_28_ResultCopiesTo><OBR_29_Parent><EIP_0_ParentSPlacerOrderNumber><EIP_0_0_EntityIdentifier></EIP_0_0_EntityIdentifier></EIP_0_ParentSPlacerOrderNumber></OBR_29_Parent><OBR_30_TransportationMode></OBR_30_TransportationMode><OBR_31_ReasonForStudy><CE_0_Identifier></CE_0_Identifier></OBR_31_ReasonForStudy><OBR_32_PrincipalResultInterpreter><NDL_0_Name><NDL_0_0_IdNumberSt></NDL_0_0_IdNumberSt></NDL_0_Name></OBR_32_PrincipalResultInterpreter><OBR_33_AssistantResultInterpreter><NDL_0_Name><NDL_0_0_IdNumberSt></NDL_0_0_IdNumberSt></NDL_0_Name></OBR_33_AssistantResultInterpreter><OBR_34_Technician><NDL_0_Name><NDL_0_0_IdNumberSt></NDL_0_0_IdNumberSt></NDL_0_Name></OBR_34_Technician><OBR_35_Transcriptionist><NDL_0_Name><NDL_0_0_IdNumberSt></NDL_0_0_IdNumberSt></NDL_0_Name></OBR_35_Transcriptionist><OBR_36_ScheduledDateTime><TS_0_TimeOfAnEvent></TS_0_TimeOfAnEvent></OBR_36_ScheduledDateTime><OBR_37_NumberOfSampleContainers></OBR_37_NumberOfSampleContainers><OBR_38_TransportLogisticsOfCollectedSample><CE_0_Identifier></CE_0_Identifier></OBR_38_TransportLogisticsOfCollectedSample><OBR_39_CollectorSComment><CE_0_Identifier></CE_0_Identifier></OBR_39_CollectorSComment><OBR_40_TransportArrangementResponsibility><CE_0_Identifier></CE_0_Identifier></OBR_40_TransportArrangementResponsibility><OBR_41_TransportArranged></OBR_41_TransportArranged><OBR_42_EscortRequired></OBR_42_EscortRequired><OBR_43_PlannedPatientTransportComment><CE_0_Identifier></CE_0_Identifier></OBR_43_PlannedPatientTransportComment><OBR_44_ProcedureCode><CE_0088_0_Identifier>82947</CE_0088_0_Identifier><CE_0088_1_Text></CE_0088_1_Text><CE_0088_2_NameOfCodingSystem>CPT</CE_0088_2_NameOfCodingSystem></OBR_44_ProcedureCode><OBR_45_ProcedureCodeModifier><CE_0340_0_Identifier></CE_0340_0_Identifier></OBR_45_ProcedureCodeModifier></OBR_ObservationRequestSegment><OBX_ObservationResultSegment><OBX_1_SetIdObx>1</OBX_1_SetIdObx><OBX_2_ValueType>NM</OBX_2_ValueType><OBX_3_ObservationIdentifier><CE_0_Identifier>10449-7</CE_0_Identifier><CE_1_Text></CE_1_Text><CE_2_NameOfCodingSystem>LOINC</CE_2_NameOfCodingSystem><CE_3_AlternateIdentifier>30104497</CE_3_AlternateIdentifier><CE_4_AlternateText>GLUCOSE,1HR PP</CE_4_AlternateText><CE_5_NameOfAlternateCodingSystem>L</CE_5_NameOfAlternateCodingSystem></OBX_3_ObservationIdentifier><OBX_4_ObservationSubId></OBX_4_ObservationSubId><OBX_5_ObservationValue>78</OBX_5_ObservationValue><OBX_6_Units><CE_0_Identifier>MG/DL</CE_0_Identifier></OBX_6_Units><OBX_7_ReferenceRange><RangeLow>65</RangeLow><RangeHigh>199</RangeHigh><RangeAlpha></RangeAlpha></OBX_7_ReferenceRange><OBX_8_AbnormalFlags></OBX_8_AbnormalFlags><OBX_9_Probability></OBX_9_Probability><OBX_10_NatureOfAbnormalTest></OBX_10_NatureOfAbnormalTest><OBX_11_ObservationResultStatus>F</OBX_11_ObservationResultStatus><OBX_12_DateLastObsNormalValues><TS_0_TimeOfAnEvent></TS_0_TimeOfAnEvent></OBX_12_DateLastObsNormalValues><OBX_13_UserDefinedAccessChecks></OBX_13_UserDefinedAccessChecks><OBX_14_DateTimeOfTheObservation><TS_0_TimeOfAnEvent>201502010737</TS_0_TimeOfAnEvent></OBX_14_DateTimeOfTheObservation><OBX_15_ProducerSId><CE_0_Identifier></CE_0_Identifier></OBX_15_ProducerSId><OBX_16_ResponsibleObserver><XCN_0_IdNumberSt></XCN_0_IdNumberSt></OBX_16_ResponsibleObserver><OBX_17_ObservationMethod><CE_0_Identifier></CE_0_Identifier></OBX_17_ObservationMethod></OBX_ObservationResultSegment><OBX_ObservationResultSegment><OBX_1_SetIdObx>1</OBX_1_SetIdObx><OBX_2_ValueType>NM</OBX_2_ValueType><OBX_3_ObservationIdentifier><CE_0_Identifier>10449-7</CE_0_Identifier><CE_1_Text></CE_1_Text><CE_2_NameOfCodingSystem>LOINC</CE_2_NameOfCodingSystem><CE_3_AlternateIdentifier>30104497</CE_3_AlternateIdentifier><CE_4_AlternateText>GLUCOSE,1HR PP</CE_4_AlternateText><CE_5_NameOfAlternateCodingSystem>L</CE_5_NameOfAlternateCodingSystem></OBX_3_ObservationIdentifier><OBX_4_ObservationSubId></OBX_4_ObservationSubId><OBX_5_ObservationValue>78</OBX_5_ObservationValue><OBX_6_Units><CE_0_Identifier>MG/DL</CE_0_Identifier></OBX_6_Units><OBX_7_ReferenceRange><RangeLow>65</RangeLow><RangeHigh>199</RangeHigh><RangeAlpha></RangeAlpha></OBX_7_ReferenceRange><OBX_8_AbnormalFlags></OBX_8_AbnormalFlags><OBX_9_Probability></OBX_9_Probability><OBX_10_NatureOfAbnormalTest></OBX_10_NatureOfAbnormalTest><OBX_11_ObservationResultStatus>F</OBX_11_ObservationResultStatus><OBX_12_DateLastObsNormalValues><TS_0_TimeOfAnEvent></TS_0_TimeOfAnEvent></OBX_12_DateLastObsNormalValues><OBX_13_UserDefinedAccessChecks></OBX_13_UserDefinedAccessChecks><OBX_14_DateTimeOfTheObservation><TS_0_TimeOfAnEvent>201502010737</TS_0_TimeOfAnEvent></OBX_14_DateTimeOfTheObservation><OBX_15_ProducerSId><CE_0_Identifier></CE_0_Identifier></OBX_15_ProducerSId><OBX_16_ResponsibleObserver><XCN_0_IdNumberSt></XCN_0_IdNumberSt></OBX_16_ResponsibleObserver><OBX_17_ObservationMethod><CE_0_Identifier></CE_0_Identifier></OBX_17_ObservationMethod></OBX_ObservationResultSegment>
        </ns0:ORU_R01_231_GLO_DEF>
      </InputMessagePart_0>
      <InputMessagePart_1>
        <ns1:MSH_25_GLO_DEF xmlns:ns1="http://microsoft.com/HealthCare/HL7/2X">
          <MSH>
            <MSH.2_EncodingCharacters>MSH.2_EncodingCharacters_0</MSH.2_EncodingCharacters>
            <MSH.3_SendingApplication>
              <HD.0_NamespaceId>HD.0_NamespaceId_0</HD.0_NamespaceId>
              <HD.1_UniversalId>HD.1_UniversalId_0</HD.1_UniversalId>
              <HD.2_UniversalIdType>HD.2_UniversalIdType_0</HD.2_UniversalIdType>
            </MSH.3_SendingApplication>
            <MSH.4_SendingFacility>
              <HD.0_NamespaceId>HD.0_NamespaceId_0</HD.0_NamespaceId>
              <HD.1_UniversalId>HD.1_UniversalId_0</HD.1_UniversalId>
              <HD.2_UniversalIdType>HD.2_UniversalIdType_0</HD.2_UniversalIdType>
            </MSH.4_SendingFacility>
            <MSH.5_ReceivingApplication>
              <HD.0_NamespaceId>HD.0_NamespaceId_0</HD.0_NamespaceId>
              <HD.1_UniversalId>HD.1_UniversalId_0</HD.1_UniversalId>
              <HD.2_UniversalIdType>HD.2_UniversalIdType_0</HD.2_UniversalIdType>
            </MSH.5_ReceivingApplication>
            <MSH.6_ReceivingFacility>
              <HD.0_NamespaceId>HD.0_NamespaceId_0</HD.0_NamespaceId>
              <HD.1_UniversalId>HD.1_UniversalId_0</HD.1_UniversalId>
              <HD.2_UniversalIdType>HD.2_UniversalIdType_0</HD.2_UniversalIdType>
            </MSH.6_ReceivingFacility>
            <MSH.7_DateTimeOfMessage>
              <TS.1>TS.1_0</TS.1>
              <TS.2>TS.2_0</TS.2>
            </MSH.7_DateTimeOfMessage>
            <MSH.8_Security>MSH.8_Security_0</MSH.8_Security>
            <MSH.9_MessageType>
              <CM_MSG.0_MessageType>CM_MSG.0_MessageType_0</CM_MSG.0_MessageType>
              <CM_MSG.1_TriggerEvent>CM_MSG.1_TriggerEvent_0</CM_MSG.1_TriggerEvent>
              <CM_MSG.2_MessageStructure>CM_MSG.2_MessageStructure_0</CM_MSG.2_MessageStructure>
            </MSH.9_MessageType>
            <MSH.10_MessageControlId>MSH.10_MessageControlId_0</MSH.10_MessageControlId>
            <MSH.11_ProcessingId>
              <PT.0_ProcessingId>PT.0_ProcessingId_0</PT.0_ProcessingId>
              <PT.1_ProcessingMode>PT.1_ProcessingMode_0</PT.1_ProcessingMode>
            </MSH.11_ProcessingId>
            <MSH.12_VersionId>
              <VID_0_VersionId>VID_0_VersionId_0</VID_0_VersionId>
              <VID_1_InternationalizationCode>
                <VID_1_0_Identifier>VID_1_0_Identifier_0</VID_1_0_Identifier>
                <VID_1_1_Text>VID_1_1_Text_0</VID_1_1_Text>
                <VID_1_2_NameOfCodingSystem>VID_1_2_NameOfCodingSystem_0</VID_1_2_NameOfCodingSystem>
                <VID_1_3_AlternateIdentifier>VID_1_3_AlternateIdentifier_0</VID_1_3_AlternateIdentifier>
                <VID_1_4_AlternateText>VID_1_4_AlternateText_0</VID_1_4_AlternateText>
                <VID_1_5_NameOfAlternateCodingSystem>VID_1_5_NameOfAlternateCodingSystem_0</VID_1_5_NameOfAlternateCodingSystem>
              </VID_1_InternationalizationCode>
              <VID_2_InternationalVersionId>
                <VID_2_0_Identifier>VID_2_0_Identifier_0</VID_2_0_Identifier>
                <VID_2_1_Text>VID_2_1_Text_0</VID_2_1_Text>
                <VID_2_2_NameOfCodingSystem>VID_2_2_NameOfCodingSystem_0</VID_2_2_NameOfCodingSystem>
                <VID_2_3_AlternateIdentifier>VID_2_3_AlternateIdentifier_0</VID_2_3_AlternateIdentifier>
                <VID_2_4_AlternateText>VID_2_4_AlternateText_0</VID_2_4_AlternateText>
                <VID_2_5_NameOfAlternateCodingSystem>VID_2_5_NameOfAlternateCodingSystem_0</VID_2_5_NameOfAlternateCodingSystem>
              </VID_2_InternationalVersionId>
            </MSH.12_VersionId>
            <MSH.13_SequenceNumber>MSH.13_SequenceNumber_0</MSH.13_SequenceNumber>
            <MSH.14_ContinuationPointer>MSH.14_ContinuationPointer_0</MSH.14_ContinuationPointer>
            <MSH.15_AcceptAcknowledgmentType>MSH.15_AcceptAcknowledgmentType_0</MSH.15_AcceptAcknowledgmentType>
            <MSH.16_ApplicationAcknowledgmentType>MSH.16_ApplicationAcknowledgmentType_0</MSH.16_ApplicationAcknowledgmentType>
            <MSH.17_CountryCode>MSH.17_CountryCode_0</MSH.17_CountryCode>
            <MSH.18_CharacterSet>MSH.18_CharacterSet_0</MSH.18_CharacterSet>
            <MSH.18_CharacterSet>MSH.18_CharacterSet_1</MSH.18_CharacterSet>
            <MSH.18_CharacterSet>MSH.18_CharacterSet_2</MSH.18_CharacterSet>
            <MSH.19_PrincipalLanguageOfMessage>
              <CE_0_Identifier>CE_0_Identifier_0</CE_0_Identifier>
              <CE_1_Text>CE_1_Text_0</CE_1_Text>
              <CE_2_NameOfCodingSystem>CE_2_NameOfCodingSystem_0</CE_2_NameOfCodingSystem>
              <CE_3_AlternateIdentifier>CE_3_AlternateIdentifier_0</CE_3_AlternateIdentifier>
              <CE_4_AlternateText>CE_4_AlternateText_0</CE_4_AlternateText>
              <CE_5_NameOfAlternateCodingSystem>CE_5_NameOfAlternateCodingSystem_0</CE_5_NameOfAlternateCodingSystem>
            </MSH.19_PrincipalLanguageOfMessage>
            <MSH.20_AlternateCharacterSetHandlingScheme>MSH.20_AlternateCharacterSetHandlingScheme_0</MSH.20_AlternateCharacterSetHandlingScheme>
            <MSH.21_ConformanceStatementId>
              <EI_0_EntityIdentifier>EI_0_EntityIdentifier_0</EI_0_EntityIdentifier>
              <EI_1_NamespaceId>EI_1_NamespaceId_0</EI_1_NamespaceId>
              <EI_2_UniversalId>EI_2_UniversalId_0</EI_2_UniversalId>
              <EI_3_UniversalIdType>EI_3_UniversalIdType_0</EI_3_UniversalIdType>
            </MSH.21_ConformanceStatementId>
            <MSH.21_ConformanceStatementId>
              <EI_0_EntityIdentifier>EI_0_EntityIdentifier_0</EI_0_EntityIdentifier>
              <EI_1_NamespaceId>EI_1_NamespaceId_0</EI_1_NamespaceId>
              <EI_2_UniversalId>EI_2_UniversalId_0</EI_2_UniversalId>
              <EI_3_UniversalIdType>EI_3_UniversalIdType_0</EI_3_UniversalIdType>
            </MSH.21_ConformanceStatementId>
            <MSH.21_ConformanceStatementId>
              <EI_0_EntityIdentifier>EI_0_EntityIdentifier_0</EI_0_EntityIdentifier>
              <EI_1_NamespaceId>EI_1_NamespaceId_0</EI_1_NamespaceId>
              <EI_2_UniversalId>EI_2_UniversalId_0</EI_2_UniversalId>
              <EI_3_UniversalIdType>EI_3_UniversalIdType_0</EI_3_UniversalIdType>
            </MSH.21_ConformanceStatementId>
          </MSH>
        </ns1:MSH_25_GLO_DEF>
      </InputMessagePart_1>
    </ns0:Root>


    Receiving Output 

    <Data><ns0:Root xmlns:ns0="http://BTAHL7Schemas.Canonical"><Records><Patient><P2>181466</P2><P3>BC699403</P3><P4>NONE</P4><P5>LOVEMONIQUE</P5><P7>19880621</P7><P8>F</P8><P11>2204 COLLIER AVENUEFAR ROCKAWAYNY11691</P11><P18></P18><P19></P19><IN2>6609</IN2><IN3></IN3></Patient><ORC><ORC3>BC699403</ORC3><ORC9>20150201</ORC9><ORC12>   UDOMRICEIZUKA P UPIN</ORC12><ORC12>   UDOMRICEIZUKA P NPI</ORC12><ORC21>JOSEPH P. ADDABBO FAMILY H.C. D T27176</ORC21><ORC22>SITE 1FAR ROCKAWAYNY11692</ORC22><ORC23>7189457150</ORC23></ORC><HL7_FileInfo><FileName>c.txt</FileName><MessageType>ORU</MessageType><FileVersion>2.3.1</FileVersion><FileDT>2016-10-21T09:16:37</FileDT></HL7_FileInfo><DG1><DG2>I09</DG2><DG3>626.0</DG3></DG1><DG1><DG2>I09</DG2><DG3>V22.2</DG3></DG1><DG1><DG2>I09</DG2><DG3>V72.3.11</DG3></DG1><OBR_ObsvReport><OBR3>BC699403</OBR3><OBR4>104497</OBR4><OBR7>20150131</OBR7><OBR8></OBR8><OBR16> UDOMRICE IZUKA UPIN</OBR16><OBR16> UDOMRICE IZUKA NPI</OBR16><OBR20>TBR</OBR20><OBR22>201502010737</OBR22><OBR44>82947</OBR44><MSH3>Informatics</MSH3><MSH4>Quest Diagnostics</MSH4><MSH6>Receiving Facility</MSH6><MSH7>20160803080616-0600</MSH7><MSH9>ORU</MSH9><MSH10>M1621608061600000427</MSH10><MSH12>2.3.1</MSH12><MultipleRecs><OBX><OBX2>NM</OBX2><OBX3>10449-7 LOINC 30104497 GLUCOSE,1HR PP L</OBX3></OBX><OBX><OBX2>NMB</OBX2><OBX3>10449-7 LOINC 30104497 GLUCOSE,1HR PP L</OBX3></OBX><OBX><OBX2>MN</OBX2><OBX3>10449-7 LOINC 30104497 GLUCOSE,1HR PP L</OBX3></OBX><OBX><OBX2>NMO</OBX2><OBX3>10449-7 LOINC 30104497 GLUCOSE,1HR PP L</OBX3></OBX></MultipleRecs></OBR_ObsvReport><OBR_ObsvReport><OBR3>BC699403</OBR3><OBR4>104497</OBR4><OBR7>20150131</OBR7><OBR8></OBR8><OBR16> UDOMRICE IZUKA UPIN</OBR16><OBR16> UDOMRICE IZUKA NPI</OBR16><OBR20>TBR</OBR20><OBR22>201502010737</OBR22><OBR44>82947</OBR44><MSH3>Informatics</MSH3><MSH4>Quest Diagnostics</MSH4><MSH6>Receiving Facility</MSH6><MSH7>20160803080616-0600</MSH7><MSH9>ORU</MSH9><MSH10>M1621608061600000427</MSH10><MSH12>2.3.1</MSH12><MultipleRecs><OBX><OBX2>NM</OBX2><OBX3>10449-7 LOINC 30104497 GLUCOSE,1HR PP L</OBX3></OBX><OBX><OBX2>NMB</OBX2><OBX3>10449-7 LOINC 30104497 GLUCOSE,1HR PP L</OBX3></OBX><OBX><OBX2>MN</OBX2><OBX3>10449-7 LOINC 30104497 GLUCOSE,1HR PP L</OBX3></OBX><OBX><OBX2>NMO</OBX2><OBX3>10449-7 LOINC 30104497 GLUCOSE,1HR PP L</OBX3></OBX></MultipleRecs></OBR_ObsvReport></Records></ns0:Root></Data>

    Expected Output

    <Data>
    	<ns0:Root xmlns:ns0="http://BTAHL7Schemas.Canonical">
     <Records>
     <Patient>
    <P2>181466</P2>
     <P3>BC699403</P3>
     <P4>NONE</P4>
     <P5>LOVEMONIQUE</P5>
    <P7>19880621</P7>
     <P8>F</P8>
     <P11>2204 COLLIER AVENUEFAR ROCKAWAYNY11691</P11>
    <P18></P18>
     <P19></P19>
     <IN2>6609</IN2>
     <IN3></IN3>
     </Patient>
     <ORC>
    <ORC3>BC699403</ORC3>
     <ORC9>20150201</ORC9>
     <ORC12>   UDOMRICEIZUKA P
    UPIN</ORC12>
     <ORC12>   UDOMRICEIZUKA P NPI</ORC12>
     <ORC21>JOSEPH P. ADDABBO
    FAMILY H.C. D T27176</ORC21>
     <ORC22>SITE 1FAR ROCKAWAYNY11692</ORC22>
    <ORC23>7189457150</ORC23>
     </ORC>
     <HL7_FileInfo>
     <FileName>c.txt</FileName>
    <MessageType>ORU</MessageType>
     <FileVersion>2.3.1</FileVersion>
     <FileDT>2016-10-
    21T09:16:37</FileDT>
     </HL7_FileInfo>
     <DG1>
     <DG2>I09</DG2>
     <DG3>626.0</DG3>
    </DG1>
     <DG1>
     <DG2>I09</DG2>
     <DG3>V22.2</DG3>
     </DG1>
     <DG1>
     <DG2>I09</DG2>
    <DG3>V72.3.11</DG3>
     </DG1>
     <OBR_ObsvReport>
     <OBR3>BC699403</OBR3>
    <OBR4>104497</OBR4>
     <OBR7>20150131</OBR7>
     <OBR8></OBR8>
     <OBR16> UDOMRICE IZUKA
    UPIN</OBR16>
     <OBR16> UDOMRICE IZUKA NPI</OBR16>
     <OBR20>TBR</OBR20>
    <OBR22>201502010737</OBR22>
     <OBR44>82947</OBR44>
     <MSH3>Informatics</MSH3>
    <MSH4>Quest Diagnostics</MSH4>
     <MSH6>Receiving Facility</MSH6>
    <MSH7>20160803080616-0600</MSH7>
     <MSH9>ORU</MSH9>
    <MSH10>M1621608061600000427</MSH10>
     <MSH12>2.3.1</MSH12>
     <MultipleRecs>
     <OBX>
    <OBX2>NM</OBX2>
     <OBX3>10449-7 LOINC 30104497 GLUCOSE,1HR PP L</OBX3>
     </OBX>
    <OBX>
     <OBX2>NMB</OBX2>
     <OBX3>10449-7 LOINC 30104497 GLUCOSE,1HR PP L</OBX3>
    </OBX>
    
     </MultipleRecs>
     </OBR_ObsvReport>
     <OBR_ObsvReport>
    <OBR3>BC699403</OBR3>
     <OBR4>104497</OBR4>
     <OBR7>20150131</OBR7>
     <OBR8></OBR8>
    <OBR16> UDOMRICE IZUKA UPIN</OBR16>
     <OBR16> UDOMRICE IZUKA NPI</OBR16>
    <OBR20>TBR</OBR20>
     <OBR22>201502010737</OBR22>
     <OBR44>82947</OBR44>
    <MSH3>Informatics</MSH3>
     <MSH4>Quest Diagnostics</MSH4>
     <MSH6>Receiving
    Facility</MSH6>
     <MSH7>20160803080616-0600</MSH7>
     <MSH9>ORU</MSH9>
    <MSH10>M1621608061600000427</MSH10>
     <MSH12>2.3.1</MSH12>
     <MultipleRecs>
     <OBX>
     <OBX2>MN</OBX2>
     <OBX3>10449-7 LOINC 30104497 GLUCOSE,1HR PP
    L</OBX3>
     </OBX>
     <OBX>
     <OBX2>NMO</OBX2>
     <OBX3>10449-7 LOINC 30104497 GLUCOSE,1HR
    PP L</OBX3>
     </OBX>
     </MultipleRecs>
     </OBR_ObsvReport>
     </Records>
     </ns0:Root>
    </Data>
    

    I am mainly worried about OBX Structure should come in output as in input. How can I fix this ?

    You can create schemas from this provided xml, and please let me know if you have any logic to fix this ?


    MBH

    Monday, October 24, 2016 3:12 AM

All replies

  • Hello Microsoft experts !!

    Please see attached are 3 xml's  (Input, RecevingOutput, ExpectedOutput).

    If you see input, OBR segment has following 2 OBX segments. 

    Then 2nd OBR has following 2 segments of OBX.... So output should be coming accordingly.

    But the output is coming weird, under 1st OBR I am receiving all OBX segments (all 4 OBX segments together).

    2nd OBR is coming with same repeatation of all segments (again all 4 OBX Segments together).

    How can I fix this ?

    • I did direct map link from Source OBR to MultiRecs node (if you see output file).
    • Set looping functoid from OBR to MultiRecs and looping functoid from OBX to Multirecs. Didnt work

    Input XML

    <ns0:Root xmlns:ns0="http://schemas.microsoft.com/BizTalk/2003/aggschema">
      <InputMessagePart_0>
        <ns0:ORU_R01_231_GLO_DEF xmlns:ns0="http://microsoft.com/HealthCare/HL7/2X"><PID_PatientIdentificationSegment><PID_1_SetIdPid>1</PID_1_SetIdPid><PID_2_PatientId><CX_0_Id>181466</CX_0_Id></PID_2_PatientId><PID_3_PatientIdentifierList><CX_0_Id>BC699403</CX_0_Id></PID_3_PatientIdentifierList><PID_4_AlternatePatientIdPid><CX_0_Id>NONE</CX_0_Id></PID_4_AlternatePatientIdPid><PID_5_PatientName><XPN_0_FamilyLastName><XPN_0_0_FamilyName>LOVE</XPN_0_0_FamilyName></XPN_0_FamilyLastName><XPN_1_GivenName>MONIQUE</XPN_1_GivenName><XPN_2_MiddleInitialOrName></XPN_2_MiddleInitialOrName></PID_5_PatientName><PID_6_MotherSMaidenName><XPN_0_FamilyLastName><XPN_0_0_FamilyName></XPN_0_0_FamilyName></XPN_0_FamilyLastName></PID_6_MotherSMaidenName><PID_7_DateTimeOfBirth><TS_0_TimeOfAnEvent>19880621</TS_0_TimeOfAnEvent></PID_7_DateTimeOfBirth><PID_8_Sex>F</PID_8_Sex><PID_9_PatientAlias><XPN_0_FamilyLastName><XPN_0_0_FamilyName></XPN_0_0_FamilyName></XPN_0_FamilyLastName></PID_9_PatientAlias><PID_10_Race><CE_0005_0_Identifier></CE_0005_0_Identifier></PID_10_Race><PID_11_PatientAddress><XAD_0_StreetAddress>2204 COLLIER AVENUE</XAD_0_StreetAddress><XAD_1_OtherDesignation>APT 6H</XAD_1_OtherDesignation><XAD_2_City>FAR ROCKAWAY</XAD_2_City><XAD_3_StateOrProvince>NY</XAD_3_StateOrProvince><XAD_4_ZipOrPostalCode>11691</XAD_4_ZipOrPostalCode></PID_11_PatientAddress><PID_12_CountyCode></PID_12_CountyCode><PID_13_PhoneNumberHome><XTN_0_9999999999X99999CAnyText></XTN_0_9999999999X99999CAnyText><XTN_1_TelecommunicationUseCode></XTN_1_TelecommunicationUseCode><XTN_2_TelecommunicationEquipmentTypeId></XTN_2_TelecommunicationEquipmentTypeId><XTN_3_EmailAddress></XTN_3_EmailAddress><XTN_4_CountryCode></XTN_4_CountryCode><XTN_5_AreaCityCode></XTN_5_AreaCityCode><XTN_6_PhoneNumber></XTN_6_PhoneNumber></PID_13_PhoneNumberHome><PID_14_PhoneNumberBusiness><XTN_0_9999999999X99999CAnyText></XTN_0_9999999999X99999CAnyText></PID_14_PhoneNumberBusiness><PID_15_PrimaryLanguage><CE_0296_0_Identifier></CE_0296_0_Identifier></PID_15_PrimaryLanguage><PID_16_MaritalStatus><CE_0002_0_Identifier></CE_0002_0_Identifier></PID_16_MaritalStatus><PID_17_Religion><CE_0006_0_Identifier></CE_0006_0_Identifier></PID_17_Religion><PID_18_PatientAccountNumber><CX_0_Id></CX_0_Id></PID_18_PatientAccountNumber><PID_19_SsnNumberPatient></PID_19_SsnNumberPatient></PID_PatientIdentificationSegment><IN1_InsuranceSegment><IN1_1_SetIdIn1>1</IN1_1_SetIdIn1><IN1_2_InsurancePlanId><CE_0072_0_Identifier>6609</CE_0072_0_Identifier></IN1_2_InsurancePlanId><IN1_3_InsuranceCompanyId><CX_0_Id></CX_0_Id></IN1_3_InsuranceCompanyId><IN1_4_InsuranceCompanyName><XON_0_OrganizationName></XON_0_OrganizationName></IN1_4_InsuranceCompanyName><IN1_5_InsuranceCompanyAddress><XAD_0_StreetAddress></XAD_0_StreetAddress></IN1_5_InsuranceCompanyAddress><IN1_6_InsuranceCoContactPerson><XPN_0_FamilyLastName><XPN_0_0_FamilyName></XPN_0_0_FamilyName></XPN_0_FamilyLastName></IN1_6_InsuranceCoContactPerson><IN1_7_InsuranceCoPhoneNumber><XTN_0_9999999999X99999CAnyText></XTN_0_9999999999X99999CAnyText></IN1_7_InsuranceCoPhoneNumber><IN1_8_GroupNumber></IN1_8_GroupNumber><IN1_9_GroupName><XON_0_OrganizationName></XON_0_OrganizationName></IN1_9_GroupName><IN1_10_InsuredSGroupEmpId><CX_0_Id></CX_0_Id></IN1_10_InsuredSGroupEmpId><IN1_11_InsuredSGroupEmpName><XON_0_OrganizationName></XON_0_OrganizationName></IN1_11_InsuredSGroupEmpName><IN1_12_PlanEffectiveDate></IN1_12_PlanEffectiveDate><IN1_13_PlanExpirationDate></IN1_13_PlanExpirationDate><IN1_14_AuthorizationInformation><AUI_0_AuthorizationNumber></AUI_0_AuthorizationNumber></IN1_14_AuthorizationInformation><IN1_15_PlanType></IN1_15_PlanType><IN1_16_NameOfInsured><XPN_0_FamilyLastName><XPN_0_0_FamilyName></XPN_0_0_FamilyName></XPN_0_FamilyLastName></IN1_16_NameOfInsured><IN1_17_InsuredSRelationshipToPatient><CE_0063_0_Identifier></CE_0063_0_Identifier></IN1_17_InsuredSRelationshipToPatient><IN1_18_InsuredSDateOfBirth><TS_0_TimeOfAnEvent></TS_0_TimeOfAnEvent></IN1_18_InsuredSDateOfBirth><IN1_19_InsuredSAddress><XAD_0_StreetAddress></XAD_0_StreetAddress></IN1_19_InsuredSAddress><IN1_20_AssignmentOfBenefits></IN1_20_AssignmentOfBenefits><IN1_21_CoordinationOfBenefits></IN1_21_CoordinationOfBenefits><IN1_22_CoordOfBenPriority></IN1_22_CoordOfBenPriority><IN1_23_NoticeOfAdmissionFlag></IN1_23_NoticeOfAdmissionFlag><IN1_24_NoticeOfAdmissionDate></IN1_24_NoticeOfAdmissionDate><IN1_25_ReportOfEligibilityFlag></IN1_25_ReportOfEligibilityFlag><IN1_26_ReportOfEligibilityDate></IN1_26_ReportOfEligibilityDate><IN1_27_ReleaseInformationCode></IN1_27_ReleaseInformationCode><IN1_28_PreAdmitCertPac></IN1_28_PreAdmitCertPac><IN1_29_VerificationDateTime><TS_0_TimeOfAnEvent></TS_0_TimeOfAnEvent></IN1_29_VerificationDateTime><IN1_30_VerificationBy><XCN_0_IdNumberSt></XCN_0_IdNumberSt></IN1_30_VerificationBy><IN1_31_TypeOfAgreementCode></IN1_31_TypeOfAgreementCode><IN1_32_BillingStatus></IN1_32_BillingStatus><IN1_33_LifetimeReserveDays></IN1_33_LifetimeReserveDays><IN1_34_DelayBeforeLRDay></IN1_34_DelayBeforeLRDay><IN1_35_CompanyPlanCode></IN1_35_CompanyPlanCode><IN1_36_PolicyNumber>XT90223Z</IN1_36_PolicyNumber></IN1_InsuranceSegment><ORC_CommonOrderSegment><ORC_1_OrderControl></ORC_1_OrderControl><ORC_2_PlacerOrderNumber><EI_0_EntityIdentifier></EI_0_EntityIdentifier></ORC_2_PlacerOrderNumber><ORC_3_FillerOrderNumber><EI_0_EntityIdentifier>BC699403</EI_0_EntityIdentifier></ORC_3_FillerOrderNumber><ORC_4_PlacerGroupNumber><EI_0_EntityIdentifier></EI_0_EntityIdentifier></ORC_4_PlacerGroupNumber><ORC_5_OrderStatus></ORC_5_OrderStatus><ORC_6_ResponseFlag></ORC_6_ResponseFlag><ORC_7_QuantityTiming><TQ_0_Quantity><TQ_0_0_Quantity></TQ_0_0_Quantity></TQ_0_Quantity></ORC_7_QuantityTiming><ORC_8_Parent><EIP_0_ParentSPlacerOrderNumber><EIP_0_0_EntityIdentifier></EIP_0_0_EntityIdentifier></EIP_0_ParentSPlacerOrderNumber></ORC_8_Parent><ORC_9_DateTimeOfTransaction><TS_0_TimeOfAnEvent>20150201</TS_0_TimeOfAnEvent></ORC_9_DateTimeOfTransaction><ORC_10_EnteredBy><XCN_0_IdNumberSt></XCN_0_IdNumberSt></ORC_10_EnteredBy><ORC_11_VerifiedBy><XCN_0_IdNumberSt></XCN_0_IdNumberSt></ORC_11_VerifiedBy><ORC_12_OrderingProvider><XCN_0_IdNumberSt></XCN_0_IdNumberSt><XCN_1_FamilyLastName><XCN_1_0_FamilyName>UDOMRICE</XCN_1_0_FamilyName></XCN_1_FamilyLastName><XCN_2_GivenName>IZUKA</XCN_2_GivenName><XCN_3_MiddleInitialOrName>P</XCN_3_MiddleInitialOrName><XCN_4_SuffixEGJrOrIii></XCN_4_SuffixEGJrOrIii><XCN_5_PrefixEGDr></XCN_5_PrefixEGDr><XCN_6_DegreeEGMd></XCN_6_DegreeEGMd><XCN_7_SourceTable>UPIN</XCN_7_SourceTable></ORC_12_OrderingProvider><ORC_12_OrderingProvider><XCN_0_IdNumberSt></XCN_0_IdNumberSt><XCN_1_FamilyLastName><XCN_1_0_FamilyName>UDOMRICE</XCN_1_0_FamilyName></XCN_1_FamilyLastName><XCN_2_GivenName>IZUKA</XCN_2_GivenName><XCN_3_MiddleInitialOrName>P</XCN_3_MiddleInitialOrName><XCN_4_SuffixEGJrOrIii></XCN_4_SuffixEGJrOrIii><XCN_5_PrefixEGDr></XCN_5_PrefixEGDr><XCN_6_DegreeEGMd></XCN_6_DegreeEGMd><XCN_7_SourceTable>NPI</XCN_7_SourceTable></ORC_12_OrderingProvider><ORC_13_EntererSLocation><PL_0_PointOfCare></PL_0_PointOfCare></ORC_13_EntererSLocation><ORC_14_CallBackPhoneNumber><XTN_0_9999999999X99999CAnyText></XTN_0_9999999999X99999CAnyText></ORC_14_CallBackPhoneNumber><ORC_15_OrderEffectiveDateTime><TS_0_TimeOfAnEvent></TS_0_TimeOfAnEvent></ORC_15_OrderEffectiveDateTime><ORC_16_OrderControlCodeReason><CE_0_Identifier></CE_0_Identifier></ORC_16_OrderControlCodeReason><ORC_17_EnteringOrganization><CE_0_Identifier></CE_0_Identifier></ORC_17_EnteringOrganization><ORC_18_EnteringDevice><CE_0_Identifier></CE_0_Identifier></ORC_18_EnteringDevice><ORC_19_ActionBy><XCN_0_IdNumberSt></XCN_0_IdNumberSt></ORC_19_ActionBy><ORC_20_AdvancedBeneficiaryNoticeCode><CE_0339_0_Identifier></CE_0339_0_Identifier></ORC_20_AdvancedBeneficiaryNoticeCode><ORC_21_OrderingFacilityName><XON_0_OrganizationName>JOSEPH P. ADDABBO FAMILY H.C.</XON_0_OrganizationName><XON_1_OrganizationNameTypeCode>D</XON_1_OrganizationNameTypeCode><XON_2_IdNumberNm>T27176</XON_2_IdNumberNm></ORC_21_OrderingFacilityName><ORC_22_OrderingFacilityAddress><XAD_0_StreetAddress>SITE 1</XAD_0_StreetAddress><XAD_1_OtherDesignation>62-00 BEACH CHANNEL DRIVE</XAD_1_OtherDesignation><XAD_2_City>FAR ROCKAWAY</XAD_2_City><XAD_3_StateOrProvince>NY</XAD_3_StateOrProvince><XAD_4_ZipOrPostalCode>11692</XAD_4_ZipOrPostalCode></ORC_22_OrderingFacilityAddress><ORC_23_OrderingFacilityPhoneNumber><XTN_0_9999999999X99999CAnyText></XTN_0_9999999999X99999CAnyText><XTN_1_TelecommunicationUseCode></XTN_1_TelecommunicationUseCode><XTN_2_TelecommunicationEquipmentTypeId></XTN_2_TelecommunicationEquipmentTypeId><XTN_3_EmailAddress></XTN_3_EmailAddress><XTN_4_CountryCode></XTN_4_CountryCode><XTN_5_AreaCityCode>718</XTN_5_AreaCityCode><XTN_6_PhoneNumber>9457150</XTN_6_PhoneNumber></ORC_23_OrderingFacilityPhoneNumber><ORC_24_OrderingProviderAddress><XAD_0_StreetAddress></XAD_0_StreetAddress></ORC_24_OrderingProviderAddress></ORC_CommonOrderSegment><DG1_Diagnostics><DG1_1_SetIdDg1>1</DG1_1_SetIdDg1><DG1_2_DiagnosisCodingMethod>I09</DG1_2_DiagnosisCodingMethod><DG1_3_DiagnosisCodeDg1><CE_0051_0_Identifier>626.0</CE_0051_0_Identifier></DG1_3_DiagnosisCodeDg1></DG1_Diagnostics><DG1_Diagnostics><DG1_1_SetIdDg1>2</DG1_1_SetIdDg1><DG1_2_DiagnosisCodingMethod>I09</DG1_2_DiagnosisCodingMethod><DG1_3_DiagnosisCodeDg1><CE_0051_0_Identifier>V22.2</CE_0051_0_Identifier></DG1_3_DiagnosisCodeDg1></DG1_Diagnostics><DG1_Diagnostics><DG1_1_SetIdDg1>3</DG1_1_SetIdDg1><DG1_2_DiagnosisCodingMethod>I09</DG1_2_DiagnosisCodingMethod><DG1_3_DiagnosisCodeDg1><CE_0051_0_Identifier>V72.3.11</CE_0051_0_Identifier></DG1_3_DiagnosisCodeDg1></DG1_Diagnostics><OBR_ObservationRequestSegment><OBR_1_SetIdObr>1</OBR_1_SetIdObr><OBR_2_PlacerOrderNumber><EI_0_EntityIdentifier></EI_0_EntityIdentifier></OBR_2_PlacerOrderNumber><OBR_3_FillerOrderNumber><EI_0_EntityIdentifier>BC699403</EI_0_EntityIdentifier></OBR_3_FillerOrderNumber><OBR_4_UniversalServiceId><CE_0_Identifier>104497</CE_0_Identifier><CE_1_Text>GLUCOSE,1HR PP</CE_1_Text><CE_2_NameOfCodingSystem>L</CE_2_NameOfCodingSystem><CE_3_AlternateIdentifier>104497W</CE_3_AlternateIdentifier><CE_4_AlternateText></CE_4_AlternateText><CE_5_NameOfAlternateCodingSystem>L</CE_5_NameOfAlternateCodingSystem></OBR_4_UniversalServiceId><OBR_5_PriorityObr></OBR_5_PriorityObr><OBR_6_RequestedDateTime><TS_0_TimeOfAnEvent></TS_0_TimeOfAnEvent></OBR_6_RequestedDateTime><OBR_7_ObservationDateTime><TS_0_TimeOfAnEvent>20150131</TS_0_TimeOfAnEvent></OBR_7_ObservationDateTime><OBR_8_ObservationEndDateTime><TS_0_TimeOfAnEvent></TS_0_TimeOfAnEvent></OBR_8_ObservationEndDateTime><OBR_9_CollectionVolume><CQ_0_Quantity></CQ_0_Quantity></OBR_9_CollectionVolume><OBR_10_CollectorIdentifier><XCN_0_IdNumberSt></XCN_0_IdNumberSt></OBR_10_CollectorIdentifier><OBR_11_SpecimenActionCode></OBR_11_SpecimenActionCode><OBR_12_DangerCode><CE_0_Identifier></CE_0_Identifier></OBR_12_DangerCode><OBR_13_RelevantClinicalInfo></OBR_13_RelevantClinicalInfo><OBR_14_SpecimenReceivedDateTime><TS_0_TimeOfAnEvent></TS_0_TimeOfAnEvent></OBR_14_SpecimenReceivedDateTime><OBR_15_SpecimenSource><SPS_0_SpecimenSourceNameOrCode><SPS_0_0_Identifier></SPS_0_0_Identifier></SPS_0_SpecimenSourceNameOrCode></OBR_15_SpecimenSource><OBR_16_OrderingProvider><XCN_0_IdNumberSt></XCN_0_IdNumberSt><XCN_1_FamilyLastName><XCN_1_0_FamilyName>UDOMRICE</XCN_1_0_FamilyName></XCN_1_FamilyLastName><XCN_2_GivenName>IZUKA</XCN_2_GivenName><XCN_3_MiddleInitialOrName>P</XCN_3_MiddleInitialOrName><XCN_4_SuffixEGJrOrIii></XCN_4_SuffixEGJrOrIii><XCN_5_PrefixEGDr></XCN_5_PrefixEGDr><XCN_6_DegreeEGMd></XCN_6_DegreeEGMd><XCN_7_SourceTable>UPIN</XCN_7_SourceTable></OBR_16_OrderingProvider><OBR_16_OrderingProvider><XCN_0_IdNumberSt></XCN_0_IdNumberSt><XCN_1_FamilyLastName><XCN_1_0_FamilyName>UDOMRICE</XCN_1_0_FamilyName></XCN_1_FamilyLastName><XCN_2_GivenName>IZUKA</XCN_2_GivenName><XCN_3_MiddleInitialOrName>P</XCN_3_MiddleInitialOrName><XCN_4_SuffixEGJrOrIii></XCN_4_SuffixEGJrOrIii><XCN_5_PrefixEGDr></XCN_5_PrefixEGDr><XCN_6_DegreeEGMd></XCN_6_DegreeEGMd><XCN_7_SourceTable>NPI</XCN_7_SourceTable></OBR_16_OrderingProvider><OBR_17_OrderCallbackPhoneNumber><XTN_0_9999999999X99999CAnyText></XTN_0_9999999999X99999CAnyText></OBR_17_OrderCallbackPhoneNumber><OBR_18_PlacerField1></OBR_18_PlacerField1><OBR_19_PlacerField2></OBR_19_PlacerField2><OBR_20_FillerField1>TBR</OBR_20_FillerField1><OBR_21_FillerField2></OBR_21_FillerField2><OBR_22_ResultsRptStatusChngDateTime><TS_0_TimeOfAnEvent>201502010737</TS_0_TimeOfAnEvent></OBR_22_ResultsRptStatusChngDateTime><OBR_23_ChargeToPractice><MOC_0_DollarAmount><MOC_0_0_Quantity></MOC_0_0_Quantity></MOC_0_DollarAmount></OBR_23_ChargeToPractice><OBR_24_DiagnosticServSectId></OBR_24_DiagnosticServSectId><OBR_25_ResultStatus></OBR_25_ResultStatus><OBR_26_ParentResult><PRL_0_Obx3ObservationIdentifierOfParentResult><PRL_0_0_Identifier></PRL_0_0_Identifier></PRL_0_Obx3ObservationIdentifierOfParentResult></OBR_26_ParentResult><OBR_27_QuantityTiming><TQ_0_Quantity><TQ_0_0_Quantity></TQ_0_0_Quantity></TQ_0_Quantity></OBR_27_QuantityTiming><OBR_28_ResultCopiesTo><XCN_0_IdNumberSt></XCN_0_IdNumberSt></OBR_28_ResultCopiesTo><OBR_29_Parent><EIP_0_ParentSPlacerOrderNumber><EIP_0_0_EntityIdentifier></EIP_0_0_EntityIdentifier></EIP_0_ParentSPlacerOrderNumber></OBR_29_Parent><OBR_30_TransportationMode></OBR_30_TransportationMode><OBR_31_ReasonForStudy><CE_0_Identifier></CE_0_Identifier></OBR_31_ReasonForStudy><OBR_32_PrincipalResultInterpreter><NDL_0_Name><NDL_0_0_IdNumberSt></NDL_0_0_IdNumberSt></NDL_0_Name></OBR_32_PrincipalResultInterpreter><OBR_33_AssistantResultInterpreter><NDL_0_Name><NDL_0_0_IdNumberSt></NDL_0_0_IdNumberSt></NDL_0_Name></OBR_33_AssistantResultInterpreter><OBR_34_Technician><NDL_0_Name><NDL_0_0_IdNumberSt></NDL_0_0_IdNumberSt></NDL_0_Name></OBR_34_Technician><OBR_35_Transcriptionist><NDL_0_Name><NDL_0_0_IdNumberSt></NDL_0_0_IdNumberSt></NDL_0_Name></OBR_35_Transcriptionist><OBR_36_ScheduledDateTime><TS_0_TimeOfAnEvent></TS_0_TimeOfAnEvent></OBR_36_ScheduledDateTime><OBR_37_NumberOfSampleContainers></OBR_37_NumberOfSampleContainers><OBR_38_TransportLogisticsOfCollectedSample><CE_0_Identifier></CE_0_Identifier></OBR_38_TransportLogisticsOfCollectedSample><OBR_39_CollectorSComment><CE_0_Identifier></CE_0_Identifier></OBR_39_CollectorSComment><OBR_40_TransportArrangementResponsibility><CE_0_Identifier></CE_0_Identifier></OBR_40_TransportArrangementResponsibility><OBR_41_TransportArranged></OBR_41_TransportArranged><OBR_42_EscortRequired></OBR_42_EscortRequired><OBR_43_PlannedPatientTransportComment><CE_0_Identifier></CE_0_Identifier></OBR_43_PlannedPatientTransportComment><OBR_44_ProcedureCode><CE_0088_0_Identifier>82947</CE_0088_0_Identifier><CE_0088_1_Text></CE_0088_1_Text><CE_0088_2_NameOfCodingSystem>CPT</CE_0088_2_NameOfCodingSystem></OBR_44_ProcedureCode><OBR_45_ProcedureCodeModifier><CE_0340_0_Identifier></CE_0340_0_Identifier></OBR_45_ProcedureCodeModifier></OBR_ObservationRequestSegment><OBX_ObservationResultSegment><OBX_1_SetIdObx>1</OBX_1_SetIdObx><OBX_2_ValueType>NM</OBX_2_ValueType><OBX_3_ObservationIdentifier><CE_0_Identifier>10449-7</CE_0_Identifier><CE_1_Text></CE_1_Text><CE_2_NameOfCodingSystem>LOINC</CE_2_NameOfCodingSystem><CE_3_AlternateIdentifier>30104497</CE_3_AlternateIdentifier><CE_4_AlternateText>GLUCOSE,1HR PP</CE_4_AlternateText><CE_5_NameOfAlternateCodingSystem>L</CE_5_NameOfAlternateCodingSystem></OBX_3_ObservationIdentifier><OBX_4_ObservationSubId></OBX_4_ObservationSubId><OBX_5_ObservationValue>78</OBX_5_ObservationValue><OBX_6_Units><CE_0_Identifier>MG/DL</CE_0_Identifier></OBX_6_Units><OBX_7_ReferenceRange><RangeLow>65</RangeLow><RangeHigh>199</RangeHigh><RangeAlpha></RangeAlpha></OBX_7_ReferenceRange><OBX_8_AbnormalFlags></OBX_8_AbnormalFlags><OBX_9_Probability></OBX_9_Probability><OBX_10_NatureOfAbnormalTest></OBX_10_NatureOfAbnormalTest><OBX_11_ObservationResultStatus>F</OBX_11_ObservationResultStatus><OBX_12_DateLastObsNormalValues><TS_0_TimeOfAnEvent></TS_0_TimeOfAnEvent></OBX_12_DateLastObsNormalValues><OBX_13_UserDefinedAccessChecks></OBX_13_UserDefinedAccessChecks><OBX_14_DateTimeOfTheObservation><TS_0_TimeOfAnEvent>201502010737</TS_0_TimeOfAnEvent></OBX_14_DateTimeOfTheObservation><OBX_15_ProducerSId><CE_0_Identifier></CE_0_Identifier></OBX_15_ProducerSId><OBX_16_ResponsibleObserver><XCN_0_IdNumberSt></XCN_0_IdNumberSt></OBX_16_ResponsibleObserver><OBX_17_ObservationMethod><CE_0_Identifier></CE_0_Identifier></OBX_17_ObservationMethod></OBX_ObservationResultSegment><OBX_ObservationResultSegment><OBX_1_SetIdObx>1</OBX_1_SetIdObx><OBX_2_ValueType>NM</OBX_2_ValueType><OBX_3_ObservationIdentifier><CE_0_Identifier>10449-7</CE_0_Identifier><CE_1_Text></CE_1_Text><CE_2_NameOfCodingSystem>LOINC</CE_2_NameOfCodingSystem><CE_3_AlternateIdentifier>30104497</CE_3_AlternateIdentifier><CE_4_AlternateText>GLUCOSE,1HR PP</CE_4_AlternateText><CE_5_NameOfAlternateCodingSystem>L</CE_5_NameOfAlternateCodingSystem></OBX_3_ObservationIdentifier><OBX_4_ObservationSubId></OBX_4_ObservationSubId><OBX_5_ObservationValue>78</OBX_5_ObservationValue><OBX_6_Units><CE_0_Identifier>MG/DL</CE_0_Identifier></OBX_6_Units><OBX_7_ReferenceRange><RangeLow>65</RangeLow><RangeHigh>199</RangeHigh><RangeAlpha></RangeAlpha></OBX_7_ReferenceRange><OBX_8_AbnormalFlags></OBX_8_AbnormalFlags><OBX_9_Probability></OBX_9_Probability><OBX_10_NatureOfAbnormalTest></OBX_10_NatureOfAbnormalTest><OBX_11_ObservationResultStatus>F</OBX_11_ObservationResultStatus><OBX_12_DateLastObsNormalValues><TS_0_TimeOfAnEvent></TS_0_TimeOfAnEvent></OBX_12_DateLastObsNormalValues><OBX_13_UserDefinedAccessChecks></OBX_13_UserDefinedAccessChecks><OBX_14_DateTimeOfTheObservation><TS_0_TimeOfAnEvent>201502010737</TS_0_TimeOfAnEvent></OBX_14_DateTimeOfTheObservation><OBX_15_ProducerSId><CE_0_Identifier></CE_0_Identifier></OBX_15_ProducerSId><OBX_16_ResponsibleObserver><XCN_0_IdNumberSt></XCN_0_IdNumberSt></OBX_16_ResponsibleObserver><OBX_17_ObservationMethod><CE_0_Identifier></CE_0_Identifier></OBX_17_ObservationMethod></OBX_ObservationResultSegment>
        <OBR_ObservationRequestSegment><OBR_1_SetIdObr>1</OBR_1_SetIdObr><OBR_2_PlacerOrderNumber><EI_0_EntityIdentifier></EI_0_EntityIdentifier></OBR_2_PlacerOrderNumber><OBR_3_FillerOrderNumber><EI_0_EntityIdentifier>BC699403</EI_0_EntityIdentifier></OBR_3_FillerOrderNumber><OBR_4_UniversalServiceId><CE_0_Identifier>104497</CE_0_Identifier><CE_1_Text>GLUCOSE,1HR PP</CE_1_Text><CE_2_NameOfCodingSystem>L</CE_2_NameOfCodingSystem><CE_3_AlternateIdentifier>104497W</CE_3_AlternateIdentifier><CE_4_AlternateText></CE_4_AlternateText><CE_5_NameOfAlternateCodingSystem>L</CE_5_NameOfAlternateCodingSystem></OBR_4_UniversalServiceId><OBR_5_PriorityObr></OBR_5_PriorityObr><OBR_6_RequestedDateTime><TS_0_TimeOfAnEvent></TS_0_TimeOfAnEvent></OBR_6_RequestedDateTime><OBR_7_ObservationDateTime><TS_0_TimeOfAnEvent>20150131</TS_0_TimeOfAnEvent></OBR_7_ObservationDateTime><OBR_8_ObservationEndDateTime><TS_0_TimeOfAnEvent></TS_0_TimeOfAnEvent></OBR_8_ObservationEndDateTime><OBR_9_CollectionVolume><CQ_0_Quantity></CQ_0_Quantity></OBR_9_CollectionVolume><OBR_10_CollectorIdentifier><XCN_0_IdNumberSt></XCN_0_IdNumberSt></OBR_10_CollectorIdentifier><OBR_11_SpecimenActionCode></OBR_11_SpecimenActionCode><OBR_12_DangerCode><CE_0_Identifier></CE_0_Identifier></OBR_12_DangerCode><OBR_13_RelevantClinicalInfo></OBR_13_RelevantClinicalInfo><OBR_14_SpecimenReceivedDateTime><TS_0_TimeOfAnEvent></TS_0_TimeOfAnEvent></OBR_14_SpecimenReceivedDateTime><OBR_15_SpecimenSource><SPS_0_SpecimenSourceNameOrCode><SPS_0_0_Identifier></SPS_0_0_Identifier></SPS_0_SpecimenSourceNameOrCode></OBR_15_SpecimenSource><OBR_16_OrderingProvider><XCN_0_IdNumberSt></XCN_0_IdNumberSt><XCN_1_FamilyLastName><XCN_1_0_FamilyName>UDOMRICE</XCN_1_0_FamilyName></XCN_1_FamilyLastName><XCN_2_GivenName>IZUKA</XCN_2_GivenName><XCN_3_MiddleInitialOrName>P</XCN_3_MiddleInitialOrName><XCN_4_SuffixEGJrOrIii></XCN_4_SuffixEGJrOrIii><XCN_5_PrefixEGDr></XCN_5_PrefixEGDr><XCN_6_DegreeEGMd></XCN_6_DegreeEGMd><XCN_7_SourceTable>UPIN</XCN_7_SourceTable></OBR_16_OrderingProvider><OBR_16_OrderingProvider><XCN_0_IdNumberSt></XCN_0_IdNumberSt><XCN_1_FamilyLastName><XCN_1_0_FamilyName>UDOMRICE</XCN_1_0_FamilyName></XCN_1_FamilyLastName><XCN_2_GivenName>IZUKA</XCN_2_GivenName><XCN_3_MiddleInitialOrName>P</XCN_3_MiddleInitialOrName><XCN_4_SuffixEGJrOrIii></XCN_4_SuffixEGJrOrIii><XCN_5_PrefixEGDr></XCN_5_PrefixEGDr><XCN_6_DegreeEGMd></XCN_6_DegreeEGMd><XCN_7_SourceTable>NPI</XCN_7_SourceTable></OBR_16_OrderingProvider><OBR_17_OrderCallbackPhoneNumber><XTN_0_9999999999X99999CAnyText></XTN_0_9999999999X99999CAnyText></OBR_17_OrderCallbackPhoneNumber><OBR_18_PlacerField1></OBR_18_PlacerField1><OBR_19_PlacerField2></OBR_19_PlacerField2><OBR_20_FillerField1>TBR</OBR_20_FillerField1><OBR_21_FillerField2></OBR_21_FillerField2><OBR_22_ResultsRptStatusChngDateTime><TS_0_TimeOfAnEvent>201502010737</TS_0_TimeOfAnEvent></OBR_22_ResultsRptStatusChngDateTime><OBR_23_ChargeToPractice><MOC_0_DollarAmount><MOC_0_0_Quantity></MOC_0_0_Quantity></MOC_0_DollarAmount></OBR_23_ChargeToPractice><OBR_24_DiagnosticServSectId></OBR_24_DiagnosticServSectId><OBR_25_ResultStatus></OBR_25_ResultStatus><OBR_26_ParentResult><PRL_0_Obx3ObservationIdentifierOfParentResult><PRL_0_0_Identifier></PRL_0_0_Identifier></PRL_0_Obx3ObservationIdentifierOfParentResult></OBR_26_ParentResult><OBR_27_QuantityTiming><TQ_0_Quantity><TQ_0_0_Quantity></TQ_0_0_Quantity></TQ_0_Quantity></OBR_27_QuantityTiming><OBR_28_ResultCopiesTo><XCN_0_IdNumberSt></XCN_0_IdNumberSt></OBR_28_ResultCopiesTo><OBR_29_Parent><EIP_0_ParentSPlacerOrderNumber><EIP_0_0_EntityIdentifier></EIP_0_0_EntityIdentifier></EIP_0_ParentSPlacerOrderNumber></OBR_29_Parent><OBR_30_TransportationMode></OBR_30_TransportationMode><OBR_31_ReasonForStudy><CE_0_Identifier></CE_0_Identifier></OBR_31_ReasonForStudy><OBR_32_PrincipalResultInterpreter><NDL_0_Name><NDL_0_0_IdNumberSt></NDL_0_0_IdNumberSt></NDL_0_Name></OBR_32_PrincipalResultInterpreter><OBR_33_AssistantResultInterpreter><NDL_0_Name><NDL_0_0_IdNumberSt></NDL_0_0_IdNumberSt></NDL_0_Name></OBR_33_AssistantResultInterpreter><OBR_34_Technician><NDL_0_Name><NDL_0_0_IdNumberSt></NDL_0_0_IdNumberSt></NDL_0_Name></OBR_34_Technician><OBR_35_Transcriptionist><NDL_0_Name><NDL_0_0_IdNumberSt></NDL_0_0_IdNumberSt></NDL_0_Name></OBR_35_Transcriptionist><OBR_36_ScheduledDateTime><TS_0_TimeOfAnEvent></TS_0_TimeOfAnEvent></OBR_36_ScheduledDateTime><OBR_37_NumberOfSampleContainers></OBR_37_NumberOfSampleContainers><OBR_38_TransportLogisticsOfCollectedSample><CE_0_Identifier></CE_0_Identifier></OBR_38_TransportLogisticsOfCollectedSample><OBR_39_CollectorSComment><CE_0_Identifier></CE_0_Identifier></OBR_39_CollectorSComment><OBR_40_TransportArrangementResponsibility><CE_0_Identifier></CE_0_Identifier></OBR_40_TransportArrangementResponsibility><OBR_41_TransportArranged></OBR_41_TransportArranged><OBR_42_EscortRequired></OBR_42_EscortRequired><OBR_43_PlannedPatientTransportComment><CE_0_Identifier></CE_0_Identifier></OBR_43_PlannedPatientTransportComment><OBR_44_ProcedureCode><CE_0088_0_Identifier>82947</CE_0088_0_Identifier><CE_0088_1_Text></CE_0088_1_Text><CE_0088_2_NameOfCodingSystem>CPT</CE_0088_2_NameOfCodingSystem></OBR_44_ProcedureCode><OBR_45_ProcedureCodeModifier><CE_0340_0_Identifier></CE_0340_0_Identifier></OBR_45_ProcedureCodeModifier></OBR_ObservationRequestSegment><OBX_ObservationResultSegment><OBX_1_SetIdObx>1</OBX_1_SetIdObx><OBX_2_ValueType>NM</OBX_2_ValueType><OBX_3_ObservationIdentifier><CE_0_Identifier>10449-7</CE_0_Identifier><CE_1_Text></CE_1_Text><CE_2_NameOfCodingSystem>LOINC</CE_2_NameOfCodingSystem><CE_3_AlternateIdentifier>30104497</CE_3_AlternateIdentifier><CE_4_AlternateText>GLUCOSE,1HR PP</CE_4_AlternateText><CE_5_NameOfAlternateCodingSystem>L</CE_5_NameOfAlternateCodingSystem></OBX_3_ObservationIdentifier><OBX_4_ObservationSubId></OBX_4_ObservationSubId><OBX_5_ObservationValue>78</OBX_5_ObservationValue><OBX_6_Units><CE_0_Identifier>MG/DL</CE_0_Identifier></OBX_6_Units><OBX_7_ReferenceRange><RangeLow>65</RangeLow><RangeHigh>199</RangeHigh><RangeAlpha></RangeAlpha></OBX_7_ReferenceRange><OBX_8_AbnormalFlags></OBX_8_AbnormalFlags><OBX_9_Probability></OBX_9_Probability><OBX_10_NatureOfAbnormalTest></OBX_10_NatureOfAbnormalTest><OBX_11_ObservationResultStatus>F</OBX_11_ObservationResultStatus><OBX_12_DateLastObsNormalValues><TS_0_TimeOfAnEvent></TS_0_TimeOfAnEvent></OBX_12_DateLastObsNormalValues><OBX_13_UserDefinedAccessChecks></OBX_13_UserDefinedAccessChecks><OBX_14_DateTimeOfTheObservation><TS_0_TimeOfAnEvent>201502010737</TS_0_TimeOfAnEvent></OBX_14_DateTimeOfTheObservation><OBX_15_ProducerSId><CE_0_Identifier></CE_0_Identifier></OBX_15_ProducerSId><OBX_16_ResponsibleObserver><XCN_0_IdNumberSt></XCN_0_IdNumberSt></OBX_16_ResponsibleObserver><OBX_17_ObservationMethod><CE_0_Identifier></CE_0_Identifier></OBX_17_ObservationMethod></OBX_ObservationResultSegment><OBX_ObservationResultSegment><OBX_1_SetIdObx>1</OBX_1_SetIdObx><OBX_2_ValueType>NM</OBX_2_ValueType><OBX_3_ObservationIdentifier><CE_0_Identifier>10449-7</CE_0_Identifier><CE_1_Text></CE_1_Text><CE_2_NameOfCodingSystem>LOINC</CE_2_NameOfCodingSystem><CE_3_AlternateIdentifier>30104497</CE_3_AlternateIdentifier><CE_4_AlternateText>GLUCOSE,1HR PP</CE_4_AlternateText><CE_5_NameOfAlternateCodingSystem>L</CE_5_NameOfAlternateCodingSystem></OBX_3_ObservationIdentifier><OBX_4_ObservationSubId></OBX_4_ObservationSubId><OBX_5_ObservationValue>78</OBX_5_ObservationValue><OBX_6_Units><CE_0_Identifier>MG/DL</CE_0_Identifier></OBX_6_Units><OBX_7_ReferenceRange><RangeLow>65</RangeLow><RangeHigh>199</RangeHigh><RangeAlpha></RangeAlpha></OBX_7_ReferenceRange><OBX_8_AbnormalFlags></OBX_8_AbnormalFlags><OBX_9_Probability></OBX_9_Probability><OBX_10_NatureOfAbnormalTest></OBX_10_NatureOfAbnormalTest><OBX_11_ObservationResultStatus>F</OBX_11_ObservationResultStatus><OBX_12_DateLastObsNormalValues><TS_0_TimeOfAnEvent></TS_0_TimeOfAnEvent></OBX_12_DateLastObsNormalValues><OBX_13_UserDefinedAccessChecks></OBX_13_UserDefinedAccessChecks><OBX_14_DateTimeOfTheObservation><TS_0_TimeOfAnEvent>201502010737</TS_0_TimeOfAnEvent></OBX_14_DateTimeOfTheObservation><OBX_15_ProducerSId><CE_0_Identifier></CE_0_Identifier></OBX_15_ProducerSId><OBX_16_ResponsibleObserver><XCN_0_IdNumberSt></XCN_0_IdNumberSt></OBX_16_ResponsibleObserver><OBX_17_ObservationMethod><CE_0_Identifier></CE_0_Identifier></OBX_17_ObservationMethod></OBX_ObservationResultSegment>
        </ns0:ORU_R01_231_GLO_DEF>
      </InputMessagePart_0>
      <InputMessagePart_1>
        <ns1:MSH_25_GLO_DEF xmlns:ns1="http://microsoft.com/HealthCare/HL7/2X">
          <MSH>
            <MSH.2_EncodingCharacters>MSH.2_EncodingCharacters_0</MSH.2_EncodingCharacters>
            <MSH.3_SendingApplication>
              <HD.0_NamespaceId>HD.0_NamespaceId_0</HD.0_NamespaceId>
              <HD.1_UniversalId>HD.1_UniversalId_0</HD.1_UniversalId>
              <HD.2_UniversalIdType>HD.2_UniversalIdType_0</HD.2_UniversalIdType>
            </MSH.3_SendingApplication>
            <MSH.4_SendingFacility>
              <HD.0_NamespaceId>HD.0_NamespaceId_0</HD.0_NamespaceId>
              <HD.1_UniversalId>HD.1_UniversalId_0</HD.1_UniversalId>
              <HD.2_UniversalIdType>HD.2_UniversalIdType_0</HD.2_UniversalIdType>
            </MSH.4_SendingFacility>
            <MSH.5_ReceivingApplication>
              <HD.0_NamespaceId>HD.0_NamespaceId_0</HD.0_NamespaceId>
              <HD.1_UniversalId>HD.1_UniversalId_0</HD.1_UniversalId>
              <HD.2_UniversalIdType>HD.2_UniversalIdType_0</HD.2_UniversalIdType>
            </MSH.5_ReceivingApplication>
            <MSH.6_ReceivingFacility>
              <HD.0_NamespaceId>HD.0_NamespaceId_0</HD.0_NamespaceId>
              <HD.1_UniversalId>HD.1_UniversalId_0</HD.1_UniversalId>
              <HD.2_UniversalIdType>HD.2_UniversalIdType_0</HD.2_UniversalIdType>
            </MSH.6_ReceivingFacility>
            <MSH.7_DateTimeOfMessage>
              <TS.1>TS.1_0</TS.1>
              <TS.2>TS.2_0</TS.2>
            </MSH.7_DateTimeOfMessage>
            <MSH.8_Security>MSH.8_Security_0</MSH.8_Security>
            <MSH.9_MessageType>
              <CM_MSG.0_MessageType>CM_MSG.0_MessageType_0</CM_MSG.0_MessageType>
              <CM_MSG.1_TriggerEvent>CM_MSG.1_TriggerEvent_0</CM_MSG.1_TriggerEvent>
              <CM_MSG.2_MessageStructure>CM_MSG.2_MessageStructure_0</CM_MSG.2_MessageStructure>
            </MSH.9_MessageType>
            <MSH.10_MessageControlId>MSH.10_MessageControlId_0</MSH.10_MessageControlId>
            <MSH.11_ProcessingId>
              <PT.0_ProcessingId>PT.0_ProcessingId_0</PT.0_ProcessingId>
              <PT.1_ProcessingMode>PT.1_ProcessingMode_0</PT.1_ProcessingMode>
            </MSH.11_ProcessingId>
            <MSH.12_VersionId>
              <VID_0_VersionId>VID_0_VersionId_0</VID_0_VersionId>
              <VID_1_InternationalizationCode>
                <VID_1_0_Identifier>VID_1_0_Identifier_0</VID_1_0_Identifier>
                <VID_1_1_Text>VID_1_1_Text_0</VID_1_1_Text>
                <VID_1_2_NameOfCodingSystem>VID_1_2_NameOfCodingSystem_0</VID_1_2_NameOfCodingSystem>
                <VID_1_3_AlternateIdentifier>VID_1_3_AlternateIdentifier_0</VID_1_3_AlternateIdentifier>
                <VID_1_4_AlternateText>VID_1_4_AlternateText_0</VID_1_4_AlternateText>
                <VID_1_5_NameOfAlternateCodingSystem>VID_1_5_NameOfAlternateCodingSystem_0</VID_1_5_NameOfAlternateCodingSystem>
              </VID_1_InternationalizationCode>
              <VID_2_InternationalVersionId>
                <VID_2_0_Identifier>VID_2_0_Identifier_0</VID_2_0_Identifier>
                <VID_2_1_Text>VID_2_1_Text_0</VID_2_1_Text>
                <VID_2_2_NameOfCodingSystem>VID_2_2_NameOfCodingSystem_0</VID_2_2_NameOfCodingSystem>
                <VID_2_3_AlternateIdentifier>VID_2_3_AlternateIdentifier_0</VID_2_3_AlternateIdentifier>
                <VID_2_4_AlternateText>VID_2_4_AlternateText_0</VID_2_4_AlternateText>
                <VID_2_5_NameOfAlternateCodingSystem>VID_2_5_NameOfAlternateCodingSystem_0</VID_2_5_NameOfAlternateCodingSystem>
              </VID_2_InternationalVersionId>
            </MSH.12_VersionId>
            <MSH.13_SequenceNumber>MSH.13_SequenceNumber_0</MSH.13_SequenceNumber>
            <MSH.14_ContinuationPointer>MSH.14_ContinuationPointer_0</MSH.14_ContinuationPointer>
            <MSH.15_AcceptAcknowledgmentType>MSH.15_AcceptAcknowledgmentType_0</MSH.15_AcceptAcknowledgmentType>
            <MSH.16_ApplicationAcknowledgmentType>MSH.16_ApplicationAcknowledgmentType_0</MSH.16_ApplicationAcknowledgmentType>
            <MSH.17_CountryCode>MSH.17_CountryCode_0</MSH.17_CountryCode>
            <MSH.18_CharacterSet>MSH.18_CharacterSet_0</MSH.18_CharacterSet>
            <MSH.18_CharacterSet>MSH.18_CharacterSet_1</MSH.18_CharacterSet>
            <MSH.18_CharacterSet>MSH.18_CharacterSet_2</MSH.18_CharacterSet>
            <MSH.19_PrincipalLanguageOfMessage>
              <CE_0_Identifier>CE_0_Identifier_0</CE_0_Identifier>
              <CE_1_Text>CE_1_Text_0</CE_1_Text>
              <CE_2_NameOfCodingSystem>CE_2_NameOfCodingSystem_0</CE_2_NameOfCodingSystem>
              <CE_3_AlternateIdentifier>CE_3_AlternateIdentifier_0</CE_3_AlternateIdentifier>
              <CE_4_AlternateText>CE_4_AlternateText_0</CE_4_AlternateText>
              <CE_5_NameOfAlternateCodingSystem>CE_5_NameOfAlternateCodingSystem_0</CE_5_NameOfAlternateCodingSystem>
            </MSH.19_PrincipalLanguageOfMessage>
            <MSH.20_AlternateCharacterSetHandlingScheme>MSH.20_AlternateCharacterSetHandlingScheme_0</MSH.20_AlternateCharacterSetHandlingScheme>
            <MSH.21_ConformanceStatementId>
              <EI_0_EntityIdentifier>EI_0_EntityIdentifier_0</EI_0_EntityIdentifier>
              <EI_1_NamespaceId>EI_1_NamespaceId_0</EI_1_NamespaceId>
              <EI_2_UniversalId>EI_2_UniversalId_0</EI_2_UniversalId>
              <EI_3_UniversalIdType>EI_3_UniversalIdType_0</EI_3_UniversalIdType>
            </MSH.21_ConformanceStatementId>
            <MSH.21_ConformanceStatementId>
              <EI_0_EntityIdentifier>EI_0_EntityIdentifier_0</EI_0_EntityIdentifier>
              <EI_1_NamespaceId>EI_1_NamespaceId_0</EI_1_NamespaceId>
              <EI_2_UniversalId>EI_2_UniversalId_0</EI_2_UniversalId>
              <EI_3_UniversalIdType>EI_3_UniversalIdType_0</EI_3_UniversalIdType>
            </MSH.21_ConformanceStatementId>
            <MSH.21_ConformanceStatementId>
              <EI_0_EntityIdentifier>EI_0_EntityIdentifier_0</EI_0_EntityIdentifier>
              <EI_1_NamespaceId>EI_1_NamespaceId_0</EI_1_NamespaceId>
              <EI_2_UniversalId>EI_2_UniversalId_0</EI_2_UniversalId>
              <EI_3_UniversalIdType>EI_3_UniversalIdType_0</EI_3_UniversalIdType>
            </MSH.21_ConformanceStatementId>
          </MSH>
        </ns1:MSH_25_GLO_DEF>
      </InputMessagePart_1>
    </ns0:Root>


    Receiving Output 

    <Data><ns0:Root xmlns:ns0="http://BTAHL7Schemas.Canonical"><Records><Patient><P2>181466</P2><P3>BC699403</P3><P4>NONE</P4><P5>LOVEMONIQUE</P5><P7>19880621</P7><P8>F</P8><P11>2204 COLLIER AVENUEFAR ROCKAWAYNY11691</P11><P18></P18><P19></P19><IN2>6609</IN2><IN3></IN3></Patient><ORC><ORC3>BC699403</ORC3><ORC9>20150201</ORC9><ORC12>   UDOMRICEIZUKA P UPIN</ORC12><ORC12>   UDOMRICEIZUKA P NPI</ORC12><ORC21>JOSEPH P. ADDABBO FAMILY H.C. D T27176</ORC21><ORC22>SITE 1FAR ROCKAWAYNY11692</ORC22><ORC23>7189457150</ORC23></ORC><HL7_FileInfo><FileName>c.txt</FileName><MessageType>ORU</MessageType><FileVersion>2.3.1</FileVersion><FileDT>2016-10-21T09:16:37</FileDT></HL7_FileInfo><DG1><DG2>I09</DG2><DG3>626.0</DG3></DG1><DG1><DG2>I09</DG2><DG3>V22.2</DG3></DG1><DG1><DG2>I09</DG2><DG3>V72.3.11</DG3></DG1><OBR_ObsvReport><OBR3>BC699403</OBR3><OBR4>104497</OBR4><OBR7>20150131</OBR7><OBR8></OBR8><OBR16> UDOMRICE IZUKA UPIN</OBR16><OBR16> UDOMRICE IZUKA NPI</OBR16><OBR20>TBR</OBR20><OBR22>201502010737</OBR22><OBR44>82947</OBR44><MSH3>Informatics</MSH3><MSH4>Quest Diagnostics</MSH4><MSH6>Receiving Facility</MSH6><MSH7>20160803080616-0600</MSH7><MSH9>ORU</MSH9><MSH10>M1621608061600000427</MSH10><MSH12>2.3.1</MSH12><MultipleRecs><OBX><OBX2>NM</OBX2><OBX3>10449-7 LOINC 30104497 GLUCOSE,1HR PP L</OBX3></OBX><OBX><OBX2>NMB</OBX2><OBX3>10449-7 LOINC 30104497 GLUCOSE,1HR PP L</OBX3></OBX><OBX><OBX2>MN</OBX2><OBX3>10449-7 LOINC 30104497 GLUCOSE,1HR PP L</OBX3></OBX><OBX><OBX2>NMO</OBX2><OBX3>10449-7 LOINC 30104497 GLUCOSE,1HR PP L</OBX3></OBX></MultipleRecs></OBR_ObsvReport><OBR_ObsvReport><OBR3>BC699403</OBR3><OBR4>104497</OBR4><OBR7>20150131</OBR7><OBR8></OBR8><OBR16> UDOMRICE IZUKA UPIN</OBR16><OBR16> UDOMRICE IZUKA NPI</OBR16><OBR20>TBR</OBR20><OBR22>201502010737</OBR22><OBR44>82947</OBR44><MSH3>Informatics</MSH3><MSH4>Quest Diagnostics</MSH4><MSH6>Receiving Facility</MSH6><MSH7>20160803080616-0600</MSH7><MSH9>ORU</MSH9><MSH10>M1621608061600000427</MSH10><MSH12>2.3.1</MSH12><MultipleRecs><OBX><OBX2>NM</OBX2><OBX3>10449-7 LOINC 30104497 GLUCOSE,1HR PP L</OBX3></OBX><OBX><OBX2>NMB</OBX2><OBX3>10449-7 LOINC 30104497 GLUCOSE,1HR PP L</OBX3></OBX><OBX><OBX2>MN</OBX2><OBX3>10449-7 LOINC 30104497 GLUCOSE,1HR PP L</OBX3></OBX><OBX><OBX2>NMO</OBX2><OBX3>10449-7 LOINC 30104497 GLUCOSE,1HR PP L</OBX3></OBX></MultipleRecs></OBR_ObsvReport></Records></ns0:Root></Data>

    Expected Output

    <Data>
    	<ns0:Root xmlns:ns0="http://BTAHL7Schemas.Canonical">
     <Records>
     <Patient>
    <P2>181466</P2>
     <P3>BC699403</P3>
     <P4>NONE</P4>
     <P5>LOVEMONIQUE</P5>
    <P7>19880621</P7>
     <P8>F</P8>
     <P11>2204 COLLIER AVENUEFAR ROCKAWAYNY11691</P11>
    <P18></P18>
     <P19></P19>
     <IN2>6609</IN2>
     <IN3></IN3>
     </Patient>
     <ORC>
    <ORC3>BC699403</ORC3>
     <ORC9>20150201</ORC9>
     <ORC12>   UDOMRICEIZUKA P
    UPIN</ORC12>
     <ORC12>   UDOMRICEIZUKA P NPI</ORC12>
     <ORC21>JOSEPH P. ADDABBO
    FAMILY H.C. D T27176</ORC21>
     <ORC22>SITE 1FAR ROCKAWAYNY11692</ORC22>
    <ORC23>7189457150</ORC23>
     </ORC>
     <HL7_FileInfo>
     <FileName>c.txt</FileName>
    <MessageType>ORU</MessageType>
     <FileVersion>2.3.1</FileVersion>
     <FileDT>2016-10-
    21T09:16:37</FileDT>
     </HL7_FileInfo>
     <DG1>
     <DG2>I09</DG2>
     <DG3>626.0</DG3>
    </DG1>
     <DG1>
     <DG2>I09</DG2>
     <DG3>V22.2</DG3>
     </DG1>
     <DG1>
     <DG2>I09</DG2>
    <DG3>V72.3.11</DG3>
     </DG1>
     <OBR_ObsvReport>
     <OBR3>BC699403</OBR3>
    <OBR4>104497</OBR4>
     <OBR7>20150131</OBR7>
     <OBR8></OBR8>
     <OBR16> UDOMRICE IZUKA
    UPIN</OBR16>
     <OBR16> UDOMRICE IZUKA NPI</OBR16>
     <OBR20>TBR</OBR20>
    <OBR22>201502010737</OBR22>
     <OBR44>82947</OBR44>
     <MSH3>Informatics</MSH3>
    <MSH4>Quest Diagnostics</MSH4>
     <MSH6>Receiving Facility</MSH6>
    <MSH7>20160803080616-0600</MSH7>
     <MSH9>ORU</MSH9>
    <MSH10>M1621608061600000427</MSH10>
     <MSH12>2.3.1</MSH12>
     <MultipleRecs>
     <OBX>
    <OBX2>NM</OBX2>
     <OBX3>10449-7 LOINC 30104497 GLUCOSE,1HR PP L</OBX3>
     </OBX>
    <OBX>
     <OBX2>NMB</OBX2>
     <OBX3>10449-7 LOINC 30104497 GLUCOSE,1HR PP L</OBX3>
    </OBX>
    
     </MultipleRecs>
     </OBR_ObsvReport>
     <OBR_ObsvReport>
    <OBR3>BC699403</OBR3>
     <OBR4>104497</OBR4>
     <OBR7>20150131</OBR7>
     <OBR8></OBR8>
    <OBR16> UDOMRICE IZUKA UPIN</OBR16>
     <OBR16> UDOMRICE IZUKA NPI</OBR16>
    <OBR20>TBR</OBR20>
     <OBR22>201502010737</OBR22>
     <OBR44>82947</OBR44>
    <MSH3>Informatics</MSH3>
     <MSH4>Quest Diagnostics</MSH4>
     <MSH6>Receiving
    Facility</MSH6>
     <MSH7>20160803080616-0600</MSH7>
     <MSH9>ORU</MSH9>
    <MSH10>M1621608061600000427</MSH10>
     <MSH12>2.3.1</MSH12>
     <MultipleRecs>
     <OBX>
     <OBX2>MN</OBX2>
     <OBX3>10449-7 LOINC 30104497 GLUCOSE,1HR PP
    L</OBX3>
     </OBX>
     <OBX>
     <OBX2>NMO</OBX2>
     <OBX3>10449-7 LOINC 30104497 GLUCOSE,1HR
    PP L</OBX3>
     </OBX>
     </MultipleRecs>
     </OBR_ObsvReport>
     </Records>
     </ns0:Root>
    </Data>
    

    I am mainly worried about OBX Structure should come in output as in input. How can I fix this ?

    You can create schemas from this provided xml, and please let me know if you have any logic to fix this ?


    MBH

    Monday, October 24, 2016 3:14 AM
  • Hi,

    It seems index problem. SO how you are doing map here?

    By using xslt you can resolve your problem. Just generate the xslt from the map and put index values where you are doing OBX and OBR mapping. I faced this type of issues and i used xslt.

    Or

    you can also table looping functoid here.

    Regards

    Abhay Giri

    Monday, October 24, 2016 4:33 AM
  • If possible I want to fix this issue using Map.

    If using Table looping functoid along with Table Extract functoid....How can i set up the properties in it ?

    The records are not always fixed like setting up the number of coloumns in Table looping functoid ?


    MBH

    Monday, October 24, 2016 1:17 PM
  • then use xslt.
    Monday, October 24, 2016 1:21 PM
  • is there no way I can use functoids in Map and fix this logic ?

    Is it must to use XSLT only ?


    MBH

    Monday, October 24, 2016 1:23 PM
  • can I use scripting functoid and use Inline XSLT here ?

    MBH

    Monday, October 24, 2016 1:32 PM
  • Any ideas please ? I am stuck here .....

    MBH

    Monday, October 24, 2016 1:56 PM
  • Hi,

    XSLT is simple to write . Do one thing first do your mapping in Mapper then validate the map, it will give you the xslt file now update that xslt and use that file as xslt file.

    Tuesday, October 25, 2016 5:42 AM
  • this is my xsl file

    the OBX structure is not outputting correctly under MultipleRecs mentioned in bold below.The XSLT mentioned here doesnt work for above logic requested.

    <?xml version="1.0" encoding="UTF-16"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:var="http://schemas.microsoft.com/BizTalk/2003/var" exclude-result-prefixes="msxsl var s1 s0 s2 s4 s3 userCSharp" version="1.0" xmlns:s1="http://microsoft.com/HealthCare/HL7/2X/2.3.1/DataTypes" xmlns:s0="http://schemas.microsoft.com/BizTalk/2003/aggschema" xmlns:s3="http://microsoft.com/HealthCare/HL7/2X/2.3.1/Tables" xmlns:s2="http://microsoft.com/HealthCare/HL7/2X/2.3.1/Segments" xmlns:ns0="http://BTAHL7Schemas.Canonical" xmlns:s4="http://microsoft.com/HealthCare/HL7/2X" xmlns:userCSharp="http://schemas.microsoft.com/BizTalk/2003/userCSharp">
      <xsl:output omit-xml-declaration="yes" method="xml" version="1.0" />
      <xsl:template match="/">
        <xsl:apply-templates select="/s0:Root" />
      </xsl:template>
      <xsl:template match="/s0:Root">
        <xsl:variable name="var:v4" select="userCSharp:StringLowerCase(&quot;a&quot;)" />
        <xsl:variable name="var:v5" select="userCSharp:DateCurrentDateTime()" />
        <ns0:Root>
          <Records>
            <xsl:for-each select="InputMessagePart_1/s4:MSH_25_GLO_DEF/MSH/MSH.4_SendingFacility">
              <MessageHeader>
                <xsl:if test="HD.0_NamespaceId">
                  <MSH4>
                    <xsl:value-of select="HD.0_NamespaceId/text()" />
                  </MSH4>
                </xsl:if>
                <xsl:if test="../MSH.6_ReceivingFacility/HD.0_NamespaceId">
                  <MSH6>
                    <xsl:value-of select="../MSH.6_ReceivingFacility/HD.0_NamespaceId/text()" />
                  </MSH6>
                </xsl:if>
                <xsl:if test="../MSH.7_DateTimeOfMessage/TS.1">
                  <MSH7>
                    <xsl:value-of select="../MSH.7_DateTimeOfMessage/TS.1/text()" />
                  </MSH7>
                </xsl:if>
                <xsl:if test="../MSH.9_MessageType/CM_MSG.0_MessageType">
                  <MSH9>
                    <xsl:value-of select="../MSH.9_MessageType/CM_MSG.0_MessageType/text()" />
                  </MSH9>
                </xsl:if>
                <MSH10>
                  <xsl:value-of select="../MSH.10_MessageControlId/text()" />
                </MSH10>
                <MSH12>
                  <xsl:value-of select="../MSH.12_VersionId/VID_0_VersionId/text()" />
                </MSH12>
              </MessageHeader>
            </xsl:for-each>
            <xsl:for-each select="InputMessagePart_0/s4:ORU_R01_231_GLO_DEF/PID_PatientIdentificationSegment">
              <xsl:for-each select="PID_3_PatientIdentifierList">
                <xsl:variable name="var:v1" select="userCSharp:StringConcat(string(../PID_5_PatientName/XPN_0_FamilyLastName/XPN_0_0_FamilyName/text()) , &quot;&quot; , string(../PID_5_PatientName/XPN_1_GivenName/text()) , &quot;&quot; , string(../PID_5_PatientName/XPN_2_MiddleInitialOrName/text()))" />
                <xsl:variable name="var:v2" select="userCSharp:StringConcat(string(../PID_11_PatientAddress/XAD_0_StreetAddress/text()) , &quot;&quot; , string(../PID_11_PatientAddress/XAD_2_City/text()) , &quot;&quot; , string(../PID_11_PatientAddress/XAD_3_StateOrProvince/text()) , &quot;&quot; , string(../PID_11_PatientAddress/XAD_4_ZipOrPostalCode/text()))" />
                <Patient>
                  <xsl:if test="../PID_2_PatientId/CX_0_Id">
                    <P2>
                      <xsl:value-of select="../PID_2_PatientId/CX_0_Id/text()" />
                    </P2>
                  </xsl:if>
                  <xsl:if test="CX_0_Id">
                    <P3>
                      <xsl:value-of select="CX_0_Id/text()" />
                    </P3>
                  </xsl:if>
                  <xsl:if test="../PID_4_AlternatePatientIdPid/CX_0_Id">
                    <P4>
                      <xsl:value-of select="../PID_4_AlternatePatientIdPid/CX_0_Id/text()" />
                    </P4>
                  </xsl:if>
                  <P5>
                    <xsl:value-of select="$var:v1" />
                  </P5>
                  <xsl:if test="../PID_7_DateTimeOfBirth/TS_0_TimeOfAnEvent">
                    <P7>
                      <xsl:value-of select="../PID_7_DateTimeOfBirth/TS_0_TimeOfAnEvent/text()" />
                    </P7>
                  </xsl:if>
                  <xsl:if test="../PID_8_Sex">
                    <P8>
                      <xsl:value-of select="../PID_8_Sex/text()" />
                    </P8>
                  </xsl:if>
                  <P11>
                    <xsl:value-of select="$var:v2" />
                  </P11>
                  <xsl:if test="../PID_18_PatientAccountNumber/CX_0_Id">
                    <P18>
                      <xsl:value-of select="../PID_18_PatientAccountNumber/CX_0_Id/text()" />
                    </P18>
                  </xsl:if>
                  <xsl:if test="../PID_19_SsnNumberPatient">
                    <P19>
                      <xsl:value-of select="../PID_19_SsnNumberPatient/text()" />
                    </P19>
                  </xsl:if>
                  <xsl:if test="../../IN1_InsuranceSegment/IN1_2_InsurancePlanId/CE_0072_0_Identifier">
                    <IN2>
                      <xsl:value-of select="../../IN1_InsuranceSegment/IN1_2_InsurancePlanId/CE_0072_0_Identifier/text()" />
                    </IN2>
                  </xsl:if>
                  <xsl:if test="../../IN1_InsuranceSegment/IN1_36_PolicyNumber">
                    <IN36>
                      <xsl:value-of select="../../IN1_InsuranceSegment/IN1_36_PolicyNumber/text()" />
                    </IN36>
                  </xsl:if>
                  <xsl:if test="../../IN2_InsuranceSegment/IN2_6_MedicareHealthInsCardNumber">
                    <IN2_6>
                      <xsl:value-of select="../../IN2_InsuranceSegment/IN2_6_MedicareHealthInsCardNumber/text()" />
                    </IN2_6>
                  </xsl:if>
                  <xsl:if test="../../IN2_InsuranceSegment/IN2_8_MedicaidCaseNumber">
                    <IN2_8>
                      <xsl:value-of select="../../IN2_InsuranceSegment/IN2_8_MedicaidCaseNumber/text()" />
                    </IN2_8>
                  </xsl:if>
                  <xsl:value-of select="../text()" />
                </Patient>
              </xsl:for-each>
            </xsl:for-each>
            <xsl:for-each select="InputMessagePart_0/s4:ORU_R01_231_GLO_DEF/ORC_CommonOrderSegment">
              <xsl:for-each select="ORC_3_FillerOrderNumber">
                <xsl:variable name="var:v3" select="userCSharp:StringConcat(string(../ORC_23_OrderingFacilityPhoneNumber/XTN_5_AreaCityCode/text()) , string(../ORC_23_OrderingFacilityPhoneNumber/XTN_6_PhoneNumber/text()))" />
                <ORC>
                  <xsl:if test="EI_0_EntityIdentifier">
                    <ORC3>
                      <xsl:value-of select="EI_0_EntityIdentifier/text()" />
                    </ORC3>
                  </xsl:if>
                  <xsl:if test="../ORC_9_DateTimeOfTransaction/TS_0_TimeOfAnEvent">
                    <ORC9>
                      <xsl:value-of select="../ORC_9_DateTimeOfTransaction/TS_0_TimeOfAnEvent/text()" />
                    </ORC9>
                  </xsl:if>
                  <xsl:for-each select="../ORC_12_OrderingProvider">
                    <ORC12>
                      <xsl:if test="XCN_0_IdNumberSt">
                        <IDNo>
                          <xsl:value-of select="XCN_0_IdNumberSt/text()" />
                        </IDNo>
                      </xsl:if>
                      <xsl:if test="XCN_1_FamilyLastName/XCN_1_0_FamilyName">
                        <LName>
                          <xsl:value-of select="XCN_1_FamilyLastName/XCN_1_0_FamilyName/text()" />
                        </LName>
                      </xsl:if>
                      <xsl:if test="XCN_2_GivenName">
                        <FName>
                          <xsl:value-of select="XCN_2_GivenName/text()" />
                        </FName>
                      </xsl:if>
                      <xsl:if test="XCN_3_MiddleInitialOrName">
                        <MI>
                          <xsl:value-of select="XCN_3_MiddleInitialOrName/text()" />
                        </MI>
                      </xsl:if>
                      <xsl:if test="XCN_7_SourceTable">
                        <SrcTbl>
                          <xsl:value-of select="XCN_7_SourceTable/text()" />
                        </SrcTbl>
                      </xsl:if>
                    </ORC12>
                  </xsl:for-each>
                  <xsl:for-each select="../ORC_21_OrderingFacilityName">
                    <ORC21>
                      <xsl:if test="XON_0_OrganizationName">
                        <AccName>
                          <xsl:value-of select="XON_0_OrganizationName/text()" />
                        </AccName>
                      </xsl:if>
                      <xsl:if test="XON_1_OrganizationNameTypeCode">
                        <Type>
                          <xsl:value-of select="XON_1_OrganizationNameTypeCode/text()" />
                        </Type>
                      </xsl:if>
                      <xsl:if test="XON_2_IdNumberNm">
                        <AccNo>
                          <xsl:value-of select="XON_2_IdNumberNm/text()" />
                        </AccNo>
                      </xsl:if>
                    </ORC21>
                  </xsl:for-each>
                  <xsl:for-each select="../ORC_22_OrderingFacilityAddress">
                    <ORC22>
                      <xsl:if test="XAD_0_StreetAddress">
                        <AddLn1>
                          <xsl:value-of select="XAD_0_StreetAddress/text()" />
                        </AddLn1>
                      </xsl:if>
                      <xsl:if test="XAD_1_OtherDesignation">
                        <Designt>
                          <xsl:value-of select="XAD_1_OtherDesignation/text()" />
                        </Designt>
                      </xsl:if>
                      <xsl:if test="XAD_2_City">
                        <City>
                          <xsl:value-of select="XAD_2_City/text()" />
                        </City>
                      </xsl:if>
                      <xsl:if test="XAD_3_StateOrProvince">
                        <St>
                          <xsl:value-of select="XAD_3_StateOrProvince/text()" />
                        </St>
                      </xsl:if>
                      <xsl:if test="XAD_4_ZipOrPostalCode">
                        <Zip>
                          <xsl:value-of select="XAD_4_ZipOrPostalCode/text()" />
                        </Zip>
                      </xsl:if>
                    </ORC22>
                  </xsl:for-each>
                  <ORC23>
                    <xsl:value-of select="$var:v3" />
                  </ORC23>
                </ORC>
              </xsl:for-each>
            </xsl:for-each>
            <HL7_FileInfo>
              <FileName>
                <xsl:value-of select="$var:v4" />
              </FileName>
              <xsl:if test="InputMessagePart_1/s4:MSH_25_GLO_DEF/MSH/MSH.9_MessageType/CM_MSG.0_MessageType">
                <MessageType>
                  <xsl:value-of select="InputMessagePart_1/s4:MSH_25_GLO_DEF/MSH/MSH.9_MessageType/CM_MSG.0_MessageType/text()" />
                </MessageType>
              </xsl:if>
              <FileVersion>
                <xsl:value-of select="InputMessagePart_1/s4:MSH_25_GLO_DEF/MSH/MSH.12_VersionId/VID_0_VersionId/text()" />
              </FileVersion>
              <FileDT>
                <xsl:value-of select="$var:v5" />
              </FileDT>
            </HL7_FileInfo>
            <xsl:for-each select="InputMessagePart_0/s4:ORU_R01_231_GLO_DEF/DG1_Diagnostics">
              <DG1>
                <xsl:if test="DG1_2_DiagnosisCodingMethod">
                  <DG2>
                    <xsl:value-of select="DG1_2_DiagnosisCodingMethod/text()" />
                  </DG2>
                </xsl:if>
                <xsl:if test="DG1_3_DiagnosisCodeDg1/CE_0051_0_Identifier">
                  <DG3>
                    <xsl:value-of select="DG1_3_DiagnosisCodeDg1/CE_0051_0_Identifier/text()" />
                  </DG3>
                </xsl:if>
              </DG1>
            </xsl:for-each>
            <xsl:for-each select="InputMessagePart_0/s4:ORU_R01_231_GLO_DEF/OBR_ObservationRequestSegment">
              <xsl:for-each select="OBR_3_FillerOrderNumber">
                <xsl:variable name="var:v6" select="userCSharp:StringConcat(string(../OBR_4_UniversalServiceId/CE_0_Identifier/text()) , &quot;  &quot; , string(../OBR_4_UniversalServiceId/CE_1_Text/text()) , &quot; &quot; , string(../OBR_4_UniversalServiceId/CE_2_NameOfCodingSystem/text()) , &quot;  &quot; , string(../OBR_4_UniversalServiceId/CE_3_AlternateIdentifier/text()) , &quot; &quot; , string(../OBR_4_UniversalServiceId/CE_4_AlternateText/text()) , &quot; &quot; , string(../OBR_4_UniversalServiceId/CE_5_NameOfAlternateCodingSystem/text()))" />
                <OBR_ObsvReport>
                  <xsl:if test="EI_0_EntityIdentifier">
                    <OBR3>
                      <xsl:value-of select="EI_0_EntityIdentifier/text()" />
                    </OBR3>
                  </xsl:if>
                  <OBR4>
                    <xsl:value-of select="$var:v6" />
                  </OBR4>
                  <xsl:if test="../OBR_7_ObservationDateTime/TS_0_TimeOfAnEvent">
                    <OBR7>
                      <xsl:value-of select="../OBR_7_ObservationDateTime/TS_0_TimeOfAnEvent/text()" />
                    </OBR7>
                  </xsl:if>
                  <xsl:if test="../OBR_8_ObservationEndDateTime/TS_0_TimeOfAnEvent">
                    <OBR8>
                      <xsl:value-of select="../OBR_8_ObservationEndDateTime/TS_0_TimeOfAnEvent/text()" />
                    </OBR8>
                  </xsl:if>
                  <xsl:for-each select="../OBR_16_OrderingProvider">
                    <OBR16>
                      <xsl:if test="XCN_0_IdNumberSt">
                        <ID>
                          <xsl:value-of select="XCN_0_IdNumberSt/text()" />
                        </ID>
                      </xsl:if>
                      <xsl:if test="XCN_1_FamilyLastName/XCN_1_0_FamilyName">
                        <LName>
                          <xsl:value-of select="XCN_1_FamilyLastName/XCN_1_0_FamilyName/text()" />
                        </LName>
                      </xsl:if>
                      <xsl:if test="XCN_2_GivenName">
                        <FName>
                          <xsl:value-of select="XCN_2_GivenName/text()" />
                        </FName>
                      </xsl:if>
                      <xsl:if test="XCN_3_MiddleInitialOrName">
                        <MI>
                          <xsl:value-of select="XCN_3_MiddleInitialOrName/text()" />
                        </MI>
                      </xsl:if>
                      <xsl:if test="XCN_7_SourceTable">
                        <SrcTbl>
                          <xsl:value-of select="XCN_7_SourceTable/text()" />
                        </SrcTbl>
                      </xsl:if>
                    </OBR16>
                  </xsl:for-each>
                  <xsl:if test="../OBR_20_FillerField1">
                    <OBR20>
                      <xsl:value-of select="../OBR_20_FillerField1/text()" />
                    </OBR20>
                  </xsl:if>
                  <xsl:if test="../OBR_22_ResultsRptStatusChngDateTime/TS_0_TimeOfAnEvent">
                    <OBR22>
                      <xsl:value-of select="../OBR_22_ResultsRptStatusChngDateTime/TS_0_TimeOfAnEvent/text()" />
                    </OBR22>
                  </xsl:if>
                  <xsl:if test="../OBR_44_ProcedureCode/CE_0088_0_Identifier">
                    <OBR44>
                      <xsl:value-of select="../OBR_44_ProcedureCode/CE_0088_0_Identifier/text()" />
                    </OBR44>
                  </xsl:if>
                  <MultipleRecs>
                    <xsl:for-each select="../../OBX_ObservationResultSegment">
                      <OBX>
                        <OBX2>
                          <xsl:value-of select="OBX_2_ValueType/text()" />
                        </OBX2>
                      </OBX>
                    </xsl:for-each>
                  </MultipleRecs>
                </OBR_ObsvReport>
              </xsl:for-each>
            </xsl:for-each>
          </Records>
        </ns0:Root>
      </xsl:template>
      <msxsl:script language="C#" implements-prefix="userCSharp"><![CDATA[
    public string StringConcat(string param0, string param1, string param2, string param3, string param4)
    {
       return param0 + param1 + param2 + param3 + param4;
    }
    
    
    public string StringConcat(string param0, string param1, string param2, string param3, string param4, string param5, string param6)
    {
       return param0 + param1 + param2 + param3 + param4 + param5 + param6;
    }
    
    
    public string DateCurrentDateTime()
    {
    	DateTime dt = DateTime.Now;
    	string curdate = dt.ToString("yyyy-MM-dd", System.Globalization.CultureInfo.InvariantCulture);
    	string curtime = dt.ToString("T", System.Globalization.CultureInfo.InvariantCulture);
    	string retval = curdate + "T" + curtime;
    	return retval;
    }
    
    
    public string StringLowerCase(string str)
    {
    	if (str == null)
    	{
    		return "";
    	}
    	return str.ToLower(System.Globalization.CultureInfo.InvariantCulture);
    }
    
    
    public string StringConcat(string param0, string param1)
    {
       return param0 + param1;
    }
    
    
    public string StringConcat(string param0, string param1, string param2, string param3, string param4, string param5, string param6, string param7, string param8, string param9, string param10)
    {
       return param0 + param1 + param2 + param3 + param4 + param5 + param6 + param7 + param8 + param9 + param10;
    }
    
    
    
    ]]></msxsl:script>
    </xsl:stylesheet>

    MBH

    Tuesday, October 25, 2016 1:11 PM
  • This i little bit special as all nodes comes beneath each other, the bellow external xslt in not complete but it shows how you can create your map by using a template that calls it self.

    <?xml version="1.0" encoding="utf-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns:msxsl="urn:schemas-microsoft-com:xslt" 
                    xmlns:root="http://schemas.microsoft.com/BizTalk/2003/aggschema"
                    xmlns:oru="http://microsoft.com/HealthCare/HL7/2X"
                    exclude-result-prefixes="msxsl root oru"
    >
        <xsl:output method="xml" indent="yes"/>
    
        <xsl:template match="/root:Root/InputMessagePart_0/oru:ORU_R01_231_GLO_DEF">
          
                <xsl:apply-templates select="OBR_ObservationRequestSegment"/>
           
        </xsl:template>
      <xsl:template match="OBR_ObservationRequestSegment">
        <request>
       
          <xsl:call-template name="OBX">
            <xsl:with-param name="current" select="."/>
          
          </xsl:call-template>
            
        </request>
    </xsl:template>
    <xsl:template name="OBX">
    <xsl:param name="current"/>
      <xsl:variable name="nextNode" select="msxsl:node-set($current)/following-sibling::*[1]"/>
      
      <xsl:if test="$nextNode and local-name($nextNode) != 'OBR_ObservationRequestSegment'">
        <z>
          <xsl:value-of select="$nextNode/OBX_2_ValueType"/>
        </z>
       <xsl:call-template name="OBX">
            <xsl:with-param name="current" select="$nextNode"/>
          
          </xsl:call-template>
      </xsl:if>
    
    </xsl:template>
    
    
    </xsl:stylesheet>
    

    Sunday, January 29, 2017 7:52 PM