MacroHealth Internal

SF - Enrollments Flat File - Incoming

The SF - Enrollments Flat File - Incoming is a standard flow that provides the baseline functionality for ingestion of an enrollment file to our database, and also provides the ability to customize values for integration-specific settings. The flow should be both customer and file-type agnostic, and be used by integration builders as a starting point for any integration that is built. It should also standardize the way a flow behaves, as well as log messages and status setting, to help with standardizing the way we build integrations for our customers.

SFEnrollmentsFlatFileIncoming.png
Configuration of the Flow Widgets

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

Widget(s)

Parameter

ExternalSourceFhir

UNIQUE_ID_1

ExternalSourceFhir

StageForExternalSink

SFTP_CONNECTION_ID

ExternalSourceFhir

StageForExternalSink

ENV

ExternalSourceFhir

StageForExternalSink

FLAT_FILENAME_REGEX

StageForExternalSink

PAYER

ValidateAndParseFile

UNIQUE_FILE_DEF_ID_1

MergeAndTranslatToFile

UNIQUE_ACK_FILE_DEF_ID_1

ValidateAndParseFile

MergeAndTranslateToFile

PAYERID

Create Enrollment Inbound Flat File Schema

Once the integration has been created and you have either imported or promoted a standard flow as inbound enrollment flat file, you must post the file schema created for “Enrollment Delimited Inbound Flat File“.

Curl the command in order to upload the schema attached in the previous step for a specific integration.

curl -X POST https://platform.prod.macrohealth.com/api/integration/INTEGRATON_ID/file/mhEnrollmentInboundDelimitedSchema \
    -H 'Content-Type: application/json' \
    -d 'BODY'

Tip

Replace BODY and INTEGRATION_ID with the content of the file attached in previous step.

Save the UUID generated in the previous step, which should be set as UNIQUE_FILE_DEF_ID_1 in the “Validate Inbound Delimited File“ widget.

Create Enrollment Acknowledgment File Schema for Inbound content

Repeat the previous steps by changing the filename in the endpoint.

Save the UUID generated in the previous step, which should be set as UNIQUE_ACK_FILE_DEF_ID_1 in the “Merge - Delimited Ack Generation“ widget.

External Source for FHIR Backed Flows

Defines the connection to an external SFTP.

ExternalSourceforFHIRBackedFlows.png
  1. id: UNIQUE_ID_1

  2. connectionId: The ID of the SFTP configured in Connections.

  3. directory: /PAYER/ENV/in

  4. filenameConvention: FLAT_FILENAME_REGEX. Where:

    • UNIQUE_ID_1: Arbitrary UUID assigned by the user

    • FLAT_FILENAME_REGEX: Regex or literal name of the file defined by the Customer

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

Validate Inbound Delimited File

This widget allows validating delimited files in this flow, data type, max lengths, and others.

ValidateInboundDelimitedFile.png
  1. fileDefinitionEntityType: PAYERIDEnrollmentInboundAckDelimitedSchema

  2. fileDefinitionId: UNIQUE_ACK_FILE_DEF_ID_1

    Where:

    • PAYERID: the name of the Payer is included as such payerEnrollmentInboundAckDelimitedSchema

    • UNIQUE_ACK_FILE_DEF_ID_1: the UUID set in the Create Enrollement Ack Fiel Schema step

For more information on how to configure this shovel operation, view Parse with File Definition.

Errors Branch
ErrorsBranch.png
Route Errors
RouteErrors.png

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

Commit Errors
CommitErrors.png

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

Commit (Errors Branch)
Commit_RouteErrors_.png

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

Propagate Branch
PropagateBranch.png
Propagate Enrollments
PropagateEnrollments.png

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

Filter Out Invalid Enrollments Branch
FilterOutInvalidEnrollements.png
Filter Out Invalid Enrollments
FilterOutInvalidEnrollments.png

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

Transaction Set to FHIR
TransactionSetToFHIR.png

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

Stage for Store FHIR Bundle
StageForStoreFHIRBundle.png

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

Commit FHIR
CommitFHIR.png

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

Commit Invalid Enrollments
CommitInvalidEnrollments.png

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

Ack Branch
AckBranch.png
Remap - Prepare Ack Content
RemapPrepareAckContent.png

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

Merge - Delimited Ack Generation

This shovel operation is used to merge enrollment records already validated and generate the ack delimited file in the output.

MergeDelimitedAckGeneration.png
  1. fileDefinitionEntityType: PAYERIDEnrollmentInboundAckDelimitedSchema

  2. fileDefinitionId: UNIQUE_ACK_FILE_DEF_ID_1

For more information on how to configure this shovel operation, view Merge and Translate to File.

Send Ack File

This shovel operation defines the connection to an external SFTP.

SendAckFile.png
  1. id: UNIQUE_ID_2

  2. connectionId: the ID of the SFTP which was configured in Connections

  3. directory: /PAYER/ENV/out

  4. filenameConvention: FLAT_FILENAME_ACK_REGEX

    Where:

    • UNIQUE_ID_1: Arbitrary UUID assigned by the user (Arbitrary ID assigned by the user and must be unique across all integrations)

    • FLAT_FILENAME_ACK_REGEX: shovel expression used to generate the file to the Customer. i.e.: concat("Eligibility_CUSTOMER_MH_", concat(formatDateTime(currentTime(),"YYYYMMddHHmmss","NETWORK"), "_ack.txt"))

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

Commit (Ack)
Commit_Ack_.png

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

Commit Unmerged
CommitUnmerged.png

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