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.

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

External Source from Network
This operation defines the connection to an external SFTP.

id: COMPONENT_UNIQUE_ID_1 (Arbitrary ID assigned by the user and must be unique across all integrations)
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.
directory: /NETWORK/ENV/in
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

fileType: 837_CLAIMS_TYPE (837i or 837p) or 835_CLAIMS_TYPE (835i or 835p)
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

Generate Ack

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

id: COMPONENT_UNIQUE_ID_2 (Arbitrary ID assigned by the user and must be unique across all integrations)
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.
directory: /NETWORK/ENV/in (the sftp destination path defined by the customer)
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

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.

Filter Out Invalid Claims

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.

type: ShovelMappingSpec
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.

caseType: Mongo DB collection name. i.e., Claims
lookupFieldsDocumentName: document name defined in the previous step for lookup search criteria.
responseDocumentName: arbitrary property name to store results
latestOnly: checked the box
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


For more information on how to configure this shovel operation, view Commit Transaction .
Invalid Claim Do Nothing


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

Generate MH Claim ID

sequence: mhID
id-name: mhID
For more information on how to configure this shovel operation, view Atomic ID .
Set Lookup Fields to Store

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.

caseType: Mongo DB collection name. i.e., Claims
caseIdDestination: caseId
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.

caseType: Mongo DB collection name. i.e., Claims
caseId:
1readField( 2 <builtin:document/caseId 3 |builtin:key/data> 4)
docType: DOCUMENT_TYPE
documentName: primary
status: Document Received
caseFileReferenceId:
1readField( 2 <builtin:document/primary 3 |builtin:key/metadata/caseFileId> 4)
lookupFieldsDocumentName: lookupFields
documentIdDestination: documentId
For more information on how to configure this shovel operation, view Stage For Store Document .
Store 837 Inbound End

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