XMap Getting Started Guide

XMap Getting Started Guide

Step 1. Create a Group Statement with Conditions

Step 1. Create a Group Statement with Conditions

Create Repeating Group statements to process the details for patients that each doctor submits claims for. Create a Group statement to process a single set of patient details for a specific patient.
  1. In the
    XMap
    view, add a Repeating Group statement to the
    Patient_Claim
    XMap. To add a Repeating Group statement, in the XMap editor grid, right-click and select
    New
    Repeating Group
    .
  2. To define the Repeating Group, perform the following steps:
    1. To name the statement, double-click the
      Name
      field and type the name
      PatientDetails
      .
    2. Drag the input schema node
      Patient
      into the Input field of the
      PatientDetails
      statement.
      Each time the transformation iterates a Repeating Group statement, the transformation processes a set of patient details.
    The following image shows the final
    PatientDetails
    Repeating Group:
    "The mapping statements grid contains the PatientDetails Repeating Group, which iterates forthe Patient element in the Input schema. Whenever the input file contains a Patient element, all the mapping statements nested under the Repeating Group statement will be performed."
  3. To create a claim for each appointment, compare the appointment details to the doctor specialization. Drag the
    Patient
    input schema node to the
    Claims
    output schema node.
    The editor creates a Repeating Group that provides the context for the patient data. We want to change the Repeating Group to a Group that contains a set of statement to perform for each claim in the output.
  4. To define the Repeating Group, perform the following steps:
    1. To change the statement to be a Group statement, click the arrow to the right of the
      Statement Type
      field and select
      Group
      .
      When the transformation processes the Group statement, the transformation processes the set of statements nested in the Group statement.
    2. To name the statement, double-click the
      Name
      field and type the name
      ContactDetails
      .
    3. Use the XPath Expression editor to edit the expression in the
      Output
      field for the
      ContactDetails
      Group statement. To open the XPath Expression editor, click the arrow to the right of the
      Output
      field.
    4. In the
      Expressions
      pane, add brackets to the right of the expression to create the following expression:
      out:Claims[]
      We use brackets to create an XPath predicate that acts as a filter. We want to associate patient information with the doctor with whom the patient had an appointment. This is also the doctor who makes the insurance claim. In the next steps, we see how to do this.
    5. To filter according to the doctor specialization, use the specialization element as the filter condition for the doctor appointments. To position the cursor in the expression, in the
      Expressions
      pane, click between the brackets in the expression
      out:Claims[]
      . In the
      Output Schema
      tab, double-click to select the
      Specialization
      node.
      The action creates the following expression:
      out:Claims[@Specialization]
    6. To the right of the
      Specialization
      node in the expression, add an equals sign to create the following expression:
      out:Claims[@Specialization=]
    7. To use the filter to match the output
      Specialization
      element to the input appointment
      Speciality
      element, add the
      Speciality
      element to the expression. Open the
      Input Schema
      tab and double-click the
      Speciality
      node that is under the
      Appointment
      node.
      There is a
      Specialty
      input node under the
      Doctor
      input node, and a
      Speciality
      input node under the
      Patient
      input node. We refer to the second node in this lesson.
      The action creates the following expression:
      out:Claims[@Specialization=../dp:input()/in:Speciality]
      . The filter uses the
      dp:input()
      function to refer to an input node from the output statement. The expression returns nodes that match
      Specialization
      to
      Speciality
      .
    8. To ensure that the claim data is matched or added for the relevant doctor, change the
      Mode
      to
      Match or Add
      .
    The following image shows the final
    ContactDetails
    Repeating Group statement:
    "The PatientDetails Repeating Group statement has another Repeating Statement nested underneath it. The second Repeating Group iterates for the Speciality element in the Input schema. For each patient in the input, the statement checks the speciality in the appointment in order to group the patient according to doctor."
  5. To transform a set of details for a specific patient, create a Group statement. Drag and drop from the
    PersonDetails
    input node to the
    Patient
    output node. In the grid, right-click the
    PersonDetails to Patient
    Group, and select
    Demote
    to nest the Group statement under the
    ContactDetails
    Repeating Group.
    The XMap editor creates a Group statement in the grid. This statement passes a single set of patient details to the output XML. When the Group statement is indented, this signifies that it is performed for every patient whose doctor appointment details match the speciality for that iteration. This means that the set of patient details are associated in the output with the doctor that makes the claim.
  6. To find every patient for the Group statement according to the patient ID, use the XPath Expression editor to edit the expression in the
    Output
    field. To define the
    Output
    field, perform the following steps:
    1. To open the XPath Expression editor, click the arrow to the right of the
      Output
      field.
    2. In the Expressions pane, add brackets to the right of the expression to create the following expression:
      out:Patient[]
      We want to find input patient contact information according to the patient ID. We also assign the input patient ID data to the ID output element. In the next steps, we see how to do this.
    3. To identify the patient according to the patient ID number, filter the patient according to the
      ID
      node as part of the output expression. Open the
      Output Schema
      tab and double-click the
      ID
      node.
      The action creates the following expression:
      out:Patient[out:ID]
    4. To the right of the expression, add an equals sign to create the following expression:
      out:Patient[out:ID=]
    5. To use the filter to match the output
      ID
      element to the input
      id
      element, add the
      id
      element to the expression. Open the
      Input Schema
      tab and double-click the
      id
      node.
      The action creates the following expression:
      out:Patient[out:ID=../dp:input()/@id]
      . The statement filters patients according to ID and passes the ID to the output.
    The following image shows the final Group statement:
    "The mapping statement grid contains a Patients Group nested under the Repeating Groups that iterate information according to the patient and the speciality for the doctor appointment associated with the patient. Use this group to logically group all statements that you want to perform for a patient."
  7. Drag the mouse from the
    Last
    input schema node to the
    Name
    output schema node.
    The XMap editor creates a Map statement named
    Last to Name
    in the grid.
  8. To demote the
    Last to Name
    statement to be within the context of the
    PersonDetails to Patient
    Group statement, select the statement and click
    Alt-Right
    as needed.
    The statement is nested within the Repeating Group and Group statements that select patients according to the filters that you defined. The patients are filtered according to the doctor that makes the claim and according to the patient ID. For each iteration of the Group statement, the statement passes the last name of the filtered patient to the output XML.
  9. To combine the first and last name in the
    Name
    output schema node, use the XPath Expression editor to edit the expression. To get data from both the first name and last name nodes in the input, edit the
    Input
    field. To edit the
    Input
    field, perform the following steps:
    1. To open the XPath Expression editor, click the arrow to the right of the
      Input
      field.
    2. To select a function, open the
      XPath
      tab and select
      Functions
      String
      .
    3. To combine the first and last names, use the
      concat()
      function. Scroll down and double-click
      concat()
      .
      The action creates the following expression:
      concat()in:Name/in:Last
      .
    4. To correctly position the last name, delete the close parenthesis character, then add it to the end of the expression.
      The function operates on parameters that are within the parenthesis, so we must position the name within the parenthesis. The action creates the following expression:
      concat(in:Name/in:Last)
      .
    5. To add the first name, open the
      Input Schema
      tab and double-click the
      First
      node.
      We want to append the first name after the last name. The action creates the following expression:
      concat(in:Name/in:Lastin:Name/in:First)
    6. To add a comma and space between the last and first name, add commas and quotation marks between the last name node and the first name node. Edit the expression to create the following expression:
      concat(in:Name/in:Last,', ',in:Name/in:First)
      We use commas to separate parameters within the concat function. The expression we created adds a space and comma between the last and first names.
    7. To test the expression, click
      Test Expression
      . Then, to enter the expression into the statement, click
      OK
      .
      When you test the expression, the
      Results
      panel displays all the nodes that result from the expression. With this method, you can check that the results are correct before you add the statement to the XMap. You can adjust the expression if needed.
    8. To ensure that the claim data is matched or added for the relevant doctor, change the
      Mode
      field to
      Match or Add
      .
    9. To ensure that if there is an error, the statement fails, change the
      On Fail
      field to
      Propagate
      .
    The following image shows the final statement:
    "The mapping statement grid contains a Patients Group nested under the Repeating Groups that iterate information according to the patient and the speciality for the doctor appointment associated with the patient. Use this group to logically group all statements that you want to perform for a patient."
  10. Drag from the
    InsuranceID
    input schema node to the
    InsuranceID
    output schema node. To demote the statement to be within the context of the
    PersonDetails to Patient
    Group statement, select the statement and click
    Alt-Right
    as needed.
    The XMap editor creates a Map statement named
    InsuranceID to InsuranceID
    in the grid. This statement passes a single insurance identification number to the output XML.
    The following image shows the final statement:
    "The mapping statement grid contains a Map statement that maps from the InsuranceID element in the input to the InsuranceID element in the output. Each time that the input contains an insurance ID for a patient, the information is passed to the output.If there is no insurance ID in the input, this is considered a failure for the statement, and the failure is propogated as the On Fail field has Propogate selected. No information is collected for a patient without an insrance ID."
  11. To pass the date of the appointment to the output, drag from the
    Date
    input schema node to the
    AppointmentDate
    output schema node. To demote the statement to be within the context of the
    PersonDetails to Patient
    Group statement, select the statement and click
    Alt-Right
    as needed.
    The XMap editor creates a Map statement named
    Date to AppointmentDate
    in the grid.
    The following image shows the final statement:
    "The mapping statement grid contains a PatientDetails Repeating Group with a Repeating Group nested underneath that checks the appointment speciality for each patient appointment with a doctor. Nested under these Repeating Groups are Groups that manage the patient details. Map statements are nested under the Group statements to pass individual patient details to the output."
  12. To save the transformation, click
    File
    Save
    .

0 COMMENTS

We’d like to hear from you!