MacroHealth Internal

SF - Claims Inbound - Incoming

The SF - Claims inbound - Incoming is a standard flow that provides the baseline functionality for ingesting a .X12 based claims file and provides the ability to customize values for integration-specific settings.

InboundFlow.jpg
Configuration of the Flow Widgets

While configuring the widgets composing this standard flow, only the following parameters should be set by the user:

  • COMPONENT_UNIQUE_ID_1

  • COMPONENT_UNIQUE_ID_2

  • SFTP_CONNECTION_ID

  • NETWORK

  • ENV

  • INCOMING_FILENAME_REGEX

  • 837_CLAIMS_TYPE

  • RECEIVER_CODE

  • ACK_FILENAME_PREFIX

  • DOCUMENT_TYPE

StartOfFlow.jpg
External Source from Network

This operation defines the connection to an external SFTP.

ExternalSourceNetwork.jpg
  1. id: COMPONENT_UNIQUE_ID_1 (Arbitrary ID assigned by the user and must be unique across all integrations)

  2. connectionId: SFTP_CONNECTION_ID, which must reference the specific connection that was created in the Platform, where the ID is equal to the UUID of that connection.

    Tip

    To obtain the URL of the connection, under Connections, select the connection required, copy and paste the URL.

  3. directory: /NETWORK/ENV/in

  4. filenameConvention: INCOMING_FILENAME_REGEX (Regex or literal name of the file defined by Customer. i.e.: ^phpub.*.txt.pgp)

For more information on how to configure this shovel operation, view External Source.

Validate and Split 837
ValidateAndSplit837.jpg
  1. fileType: 837_CLAIMS_TYPE (837i or 837p) or 835_CLAIMS_TYPE (835i or 835p)

  2. validationRules: Add content validation based on customer rules. If no custom rules are used, leave the [] entry. When entering rules, adhere to the following format:

    [
    2  {
    3    "Type": "set_element_usage",
    4    "Rule": {
    5      "Location": {
    6        "Loop": [
    7          "2000B",
    8          "2010BA"
    9        ],
    10        "Object": {
    11          "ID": "NM1",
    12          "Name": "Subscriber Name"
    13        }
    14      },
    15      "ElementIndex": 9,
    16      "Usage":  "REQUIRED"
    17    }
    18  }
    19]

For more information on how to configure this shovel operation, view Validate and Split File.

Ack Branch
AckBranch.jpg
Generate Ack
GenerateAck.jpg
  1. receiverCode: RECEIVER_CODE (code or ID defined by the customer). This would normally be the Interchange Receiver ID (ISA08 and GS03), which is the name of the entity that will receive the entity.

For more information on how to configure this shovel operation, view Translate To X12.

Send Ack to Network
SendAckToNetowrk.jpg
  1. id: COMPONENT_UNIQUE_ID_2 (Arbitrary ID assigned by the user and must be unique across all integrations)

  2. connectionId: SFTP_CONNECTION_ID, which must reference the specific connection that created in the Platform, where the ID is equal to the UUID of that connection.

    Tip

    To obtain the URL of the connection, under Connections, select the connection required, copy and paste the URL.

  3. directory: /NETWORK/ENV/in (the sftp destination path defined by the customer)

  4. destinationFileName: concat ("ACK_FILENAME_PREFIX", "_999.txt") (suffix name of the file defined by Customer. i.e.: concat ("phpub", concat (formatDateTime(currentTime), "MMddYYYYHHmmss", "UTC"), "_999.txt"))

For more information on how to configure this shovel operation, view Stage For External Sink.

Send Ack End
SendAckEnd.jpg

For more information on how to configure this shovel operation, view Commit Transaction .

Filter Out Claims and Check Duplicates Branch

From the Standard 837 Claims flows implementation, validate-and-split 837, the flow will contain a ts-validation object containing the result of the validation on IK5 segment with values: A|E|R, claims marked as R (Rejected) will be descarted. Using the lookup fields defined in the Set Duplicate and Lookup Fields step we look into the DB for matching results to find duplicates.

FilterclaimsCheckDup.jpg
Filter Out Invalid Claims
FilterOutInvalidClaims.jpg

For more information on how to configure this shovel operation, view Route on Expression .

Set Duplicate Lookup Fields

This shovel operation allows looking up search criteria based on claim number.

SetDuplicateLookupFields.jpg
  1. type: ShovelMappingSpec

  2. expressionResultsContext: expressionresult

    [
    2  {
    3    "name": "repriced_claim_number",
    4    "mapping": {
    5      "path": "context.lookupFieldsDupeCheck.data.DOCUMENT_TYPE.repricedClaimNumber",
    6      "value": "if(isNull(getElemAt(flatten(readField(<builtin:document/primary|builtin:key/data/segments|builtin:array_filter_by_key/2000C|builtin:key/2000C>)),0)),getElemAt(flatten(readField(<builtin:document/primary|builtin:key/data/segments|builtin:array_filter_by_key/2000B|builtin:key/2000B|builtin:array_filter_by_key/2300|builtin:key/2300|builtin:array_filter_by_key_value/REF01/value=9A|builtin:key/REF02/value>)),0),getElemAt(flatten(readField(<builtin:document/primary|builtin:key/data/segments|builtin:array_filter_by_key/2000C|builtin:key/2000C|builtin:array_filter_by_key/2300|builtin:key/2300|builtin:array_filter_by_key_value/REF01/value=9A|builtin:key/REF02/value>)),0))"
    7    }
    8  }
    9]

    Note

    DOCUMENT_TYPE is the document type defined in the inbound phase, such as “AdjudicationRequest“.

For more information on how to configure this shovel operation, view Remap Document .

Check Duplicate Claim

Using the lookup fields defined in the "Set Duplicate Lookup Fields" step, we look into the DB for matching results.

CheckDuplicateClaim.jpg
  1. caseType: Mongo DB collection name. i.e., Claims

  2. lookupFieldsDocumentName: document name defined in the previous step for lookup search criteria.

  3. responseDocumentName: arbitrary property name to store results

  4. latestOnly: checked the box

  5. docTypeFilter: DOCUMENT_TYPE (the document type defined in the inbound phase, such as “AdjudicationRequest“)

For more information on how to configure this shovel operation, view Lookup Cases.

Duplicate Case Do Nothing
DuplicateCaseDoNothingBranch.jpg
DuplicateDoNothing.jpg

For more information on how to configure this shovel operation, view Commit Transaction .

Invalid Claim Do Nothing
InvalidClaimDoNothingBranch.jpg
InvalidClaimDoNothing.jpg

For more information on how to configure this shovel operation, view Commit Transaction .

Store Claims Branch
StoreClaimsBranch.jpg
Generate MH Claim ID
GenerateMHClaimID.jpg
  1. sequence: mhID

  2. id-name: mhID

For more information on how to configure this shovel operation, view Atomic ID .

Set Lookup Fields to Store
SetLookupFiledsToStore.jpg
  1. mappings:

    [
    2  {
    3    "name": "macrohealth_claim_id",
    4    "mapping": {
    5      "path": "context.lookupFields.data.mhClaimId",
    6      "value": "readField(<builtin:document/mhClaimId|builtin:key/data/mhClaimId>)"
    7    }
    8  },
    9  {
    10    "name": "claim_type",
    11    "mapping": {
    12      "path": "context.lookupFields.data.claimType",
    13      "value": "readField(<builtin:document/ts-validation|builtin:key/metadata/schema>)"
    14    }
    15  },
    16  {
    17    "name": "repriced_claim_number",
    18    "mapping": {
    19      "path": "context.lookupFields.data.repricedClaimNumber",
    20      "value": "if(isNull(getElemAt(flatten(readField(<builtin:document/primary|builtin:key/data/segments|builtin:array_filter_by_key/2000C|builtin:key/2000C>)),0)),getElemAt(flatten(readField(<builtin:document/primary|builtin:key/data/segments|builtin:array_filter_by_key/2000B|builtin:key/2000B|builtin:array_filter_by_key/2300|builtin:key/2300|builtin:array_filter_by_key_value/REF01/value=9A|builtin:key/REF02/value>)),0),getElemAt(flatten(readField(<builtin:document/primary|builtin:key/data/segments|builtin:array_filter_by_key/2000C|builtin:key/2000C|builtin:array_filter_by_key/2300|builtin:key/2300|builtin:array_filter_by_key_value/REF01/value=9A|builtin:key/REF02/value>)),0))"
    21    }
    22  }
    23]

For more information on how to configure this shovel operation, view Remap Document .

Store Case

This shovel operation allows creating the Mongo DB object.

StoreCase.jpg
  1. caseType: Mongo DB collection name. i.e., Claims

  2. caseIdDestination: caseId

  3. status: Claim Received

    Important

    This value must not be edited by the user.

For more information on how to configure this shovel operation, view Stage For Store Case .

Store Document in Case

This shovel operation allows storing the X12 json formatted document in the database.

StoreDocumentInCase.jpg
  1. caseType: Mongo DB collection name. i.e., Claims

  2. caseId:

    1readField(
    2  <builtin:document/caseId
    3  |builtin:key/data>
    4)
  3. docType: DOCUMENT_TYPE

  4. documentName: primary

  5. status: Document Received

  6. caseFileReferenceId:

    1readField(
    2  <builtin:document/primary
    3  |builtin:key/metadata/caseFileId>
    4)
  7. lookupFieldsDocumentName: lookupFields

  8. documentIdDestination: documentId

For more information on how to configure this shovel operation, view Stage For Store Document .

Store 837 Inbound End
Store837InboundEnd.jpg

For more information on how to configure this shovel operation, view Commit Transaction .