EDI Management

EDI Management is where you configure how GEMA processes incoming electronic data interchange (EDI) files, and where you monitor files waiting to be processed or already accepted.

Who can open it

  • As a tenant administrator, you open EDI Management from the left navigation inside your own organization. You see and edit only mappings that belong to your organization. Incoming and accepted files are limited to your organization as well.
  • As a global administrator, you open EDI Management while working in the platform operations view and see every mapping across customers.

If you are neither a tenant administrator nor a global administrator in that platform view, you are taken away from this page and the content is not shown.


Accessing EDI Management

From the left navigation, select EDI Management. The page loads with three tabs:

  • Mappings — Define and manage EDI mapping configurations.
  • Incoming Files — View files that have arrived via SFTP but have not yet been processed.
  • Accepted Files — View files that have been accepted for processing, and upload a file to send it through a mapping.

Mappings Tab

The Mappings tab shows a searchable table of EDI mapping configurations. As a tenant administrator you see your organization’s mappings. As a global administrator you see every mapping. Each row displays the mapping name, parser type (shown as a colored chip), client, priority, and whether the mapping is Active or Deactivated.

Adding a Mapping

  1. Select Add EDI Mapping in the upper right of the Mappings table.
  2. You are taken to the mapping editor where you can define the mapping configuration.
  3. In the Config panel, choose where the files come from under Data Source, then fill in the mapping name, client, parser, and other settings. As a tenant administrator, the customer for the mapping is fixed to your organization and cannot be changed. As a global administrator, you choose which customer the mapping serves. No target schema selection is required — the mapping type is inferred automatically from the field mappings you define.

Editing a Mapping

Select any row in the Mappings table, or select the Edit (pencil icon) in the Actions column, to open the full-page mapping editor for that configuration.

In the editor you can modify the mapping rules, parser type, client assignment, priority, and active status. Save your changes when done.

Deleting a Mapping

Select the Delete (trash icon) in the Actions column for the mapping you want to remove. Confirm the deletion in the dialog that appears.


Mapping Editor

Choosing Where Files Come From

In the Config panel, Data Source sets where this mapping gets its files:

  • S3 Files (CSV/Excel) — Files that the client puts in our storage. A Client Name and an Incoming Folder tell GEMA where to look.
  • PharmPix API — Claims pulled from PharmPix. The file controls are hidden for this source.
  • Client SFTP server — Files that GEMA pulls from a server the client runs. GEMA connects on a schedule, copies new files that match the Filename Pattern, and removes each one from the client’s server only after our copy is safely stored.

The Filename Pattern, Parser Type, Parser Settings, and Field Mappings work the same way for our storage and for a client server. The pattern is checked against the file name only, not the folder.

Pharmacy claim batch (NCPDP parser type)

Choose ncpdp as the Parser Type when the file is a pharmacy claim batch (NCPDP Batch), not an X12 enrollment or eligibility file such as an 834.

When Field Mappings is still empty and you select ncpdp, GEMA fills in a ready-made pharmacy-claim field mapping in the editor. If you already have mapping rules, your work is left unchanged.

After a file is processed, a rejected pharmacy claim on the mapping can start a prior authorization workflow the same way a rejected PharmPix claim does.

One client can have more than one mapping. For example, you can keep one mapping for files in our storage and a second mapping for files on the client’s own server.

Client SFTP Server Fields

After you choose Client SFTP server, the Client SFTP Server section of the Config panel asks for:

  • Client Name — The name that groups this client’s files once they are pulled in.
  • Host — The hostname of the client’s server.
  • Port — The port number. It starts at 22.
  • Username — The account GEMA signs in with.
  • Remote Folder — The folder on the client’s server that GEMA pulls files from.
  • Host Key Fingerprint (Optional) — The fingerprint of the key the client’s server should show, for example SHA256:.... When you fill it in, GEMA connects only if the server shows exactly that key. When you leave it blank, GEMA connects without checking the server’s key. Clear the field and save to stop checking.
  • SSH Private Key (PEM) and Password — How GEMA signs in. Enter a key, a password, or both. A mapping cannot be activated until one of them is saved.

GEMA never shows a saved key or password again. After you save, a green check appears next to each one that is stored, with the note to leave the field blank to keep it. Type a new value only when you want to replace the saved one.

Test Data on a Client SFTP server mapping lists the files in the saved remote folder whose names match the filename pattern. Save the connection before you open Test Data. Until the connection is saved, the panel asks you to save it first and does not list any files. The list uses the host, port, and sign-in already stored. When Files are encrypted with GPG is on, loading a file decrypts it with the tenant key before the rows appear.

If the fingerprint is filled in and the server shows a different key, GEMA stops before it signs in and the shield bell in the header lights up. See Host Key Mismatch Bell below.

Decrypting Files

For both S3 Files (CSV/Excel) and Client SFTP server mappings, the Decryption section has a Files are encrypted with GPG switch. It is off by default.

When you turn it on, GEMA decrypts each file with the tenant’s key before it reads the file, whether the file arrives in our storage or on the client’s server. The editor shows the tenant’s public key and its fingerprint. Select Copy Public Key and give that key to the client so they can encrypt their files to GEMA. The private key is never shown.

Test Data and Run decrypt the file you select the same way, whether it is in our storage, on the client’s server, or uploaded from your computer. Save the mapping with the switch on first, because the test uses the saved setting. If the tenant has no key, or the file was not encrypted to that key, the test stops and says that decryption failed.

If the tenant has no key yet, the editor tells you so. Open the tenant’s Integrations screen and use the GPG Key tab to create one. The link in the message takes you to the tenant.

Field Mapping Paths

In the Field Mappings editor, write a nested path either as a list of names, such as ["insurance", "member_id"], or with dots, such as "insurance.member_id". Both put the value in the same place. A single name, such as "member_id", also works.

When part of a path is an expression (for example, a column whose value becomes the key), the value it produces is used as one name even if it contains dots.

An approval spreadsheet (continuation approvals) maps authorizations fields on the patient: auth_type (medication), pa_number, approval_date, expiration_date, ndc_code or medication_key, source (edi), and optional lead_days. Map insurance.member_id and insurance.person_code so GEMA can match the patient. A lead time of 14 days is the default and is not stored on the authorization record. The import writes the authorization on the patient chart and does not start a prior authorization workflow or select a guideline.

How Mapping Type Is Determined

The mapping type — patient, business units, or user list — is inferred automatically from the root-level paths in your field mappings. You do not pick it in the Config panel. The only time you choose a file type yourself is before Map with AI, described under AI Field Mapping.

  • Business units — if all paths start with carrier, account, or group (e.g. ["carrier", "id"]).
  • User list — if all paths start with user (for example ["user", "email"]). A user list creates or updates the people in your organization’s user directory, matched by email. New people are added as invited users with no administrator access and no sign-in account is created. A user list never creates patients, and people who are missing from the file are left unchanged. Each person is tied to the identity provider whose email domain matches their address. A row for someone already tied to a different identity provider fails, and that person is left unchanged. The fields under user are the email, first name, last name, and groups. Groups holds the identity-provider group names or IDs for each person. It is not the business unit group path.
  • Patient — if all paths start with patient-level roots such as patient, insurance, medications, observations, diagnosis, procedures, or authorizations.

A mapping that mixes these types will display an error and cannot be activated. Split it into separate mappings if needed.

The inferred type is stored automatically on save so the processor can handle the file correctly.

Sync Mode (Business Units only)

When the field mappings target the business unit schema (carrier / account / group paths), a Sync Mode section appears near the bottom of the Config panel:

  • Upsert Only — Adds new business units and updates existing ones. Units absent from the file are left unchanged. Use this for partial files or incremental feeds.
  • Full Sync — delete missing BUs — After upserting, deactivates any active business units (within carriers present in the file) that did not appear in the file. A warning is displayed when this mode is selected. Use only when the file is a complete, authoritative list for the included carriers.

When Full Sync is selected, a Delete safety threshold (%) field appears. This is a circuit breaker: if a single import would deactivate that percentage or more of the business units under the carriers present in the file, all deletes are skipped, the upserts still apply, and the import is flagged with a clear warning. This protects against a truncated or malformed file wiping out a carrier’s tree. The default is 40%. Because deletes are always scoped to carriers present in the file, entirely absent carriers are never touched — offboarding a whole carrier is done through the business unit screens, not by omitting it from a file.

Activation

The Activation toggle is at the bottom of the Config panel, after all other configuration. A mapping cannot be activated until field mappings are defined and parser configuration is set. If conditions are not met, the reason is shown below the toggle.

AI Field Mapping

Load test data first using the Test Data button, then click Map with AI. A dialog opens and asks you to choose the file type before the mapping starts. Generate stays unavailable until you choose one:

  • Patient data — Patients, insurance, medications, claims, and similar records. The mapped row is nested under patient.
  • Business units — A carrier, account, and group hierarchy.
  • User list — A staff roster of the people who sign in to GEMA, with a name, an email, and a group or role for each person. The mapped row is nested under user.

Choose User list for a staff roster. The AI then maps the first name, last name, email, and group columns under user, so a person’s name, email, and group are not treated as a patient’s name, email, and insurance group. Your choice applies even when the mapping has no rules yet. A user list is not patient data.

When the job finishes, any suggested column validation patterns from the AI are applied in the Column validation section below your field mappings.

Column validation (CSV and Excel with headers)

For Parser Type CSV or Excel when Parser Settings keep has_header enabled (the default), a Column validation section appears under Field Mappings.

The table lists each source column your field mappings read. For each column you can enter an optional Pattern (regex). At import time, GEMA trims the cell value and checks it against the pattern when one is set. Rows that fail are skipped. Columns with a blank pattern only require a non-empty value.

Failure limit (%) is the maximum share of rows that may fail validation before the entire file is rejected. The default is 10%. This limit is separate from the Delete safety threshold (%) used for business unit Full Sync.

Saving the mapping always sends column checks and the failure limit for headered CSV and Excel mappings so intake validation is enabled on the next import.

When you choose the 834 parser and the field mappings are empty, the editor starts you from a standard eligibility mapping. It covers member ID, person code, group, carrier, coverage start and end dates, and the member’s name, birth date, gender, and address. The mapping is a starting point in the editor until you click Save, and you can edit it freely. A mapping you already have is left as you wrote it.

For a payer or sponsor whose companion guide adds its own fields, load a sample 834 file with Test Data and click Map with AI. On an 834 sample, the AI writes the eligibility mapping from the rows you loaded, including the companion guide’s extra fields for carrier, account, group, and person code.

Schema Reference Panel

In the main editor view, switch the right panel to Schema to view the JSON schema for the inferred mapping type. For patient mappings, this shows the patient record schema. For business unit mappings, this shows the carrier/account/group schema expected for each row. For user list mappings, this shows the user object expected for each row, with the email, first name, last name, and groups inside it. The schema panel updates automatically as you edit field mappings.

Testing a Mapping

Select Run in the editor header to open the test dialog. Under Test Mode, choose how to give the mapping a file:

  • Paste Sample Data — Paste a small text sample, such as a few CSV lines, and select Run Test.
  • Select S3 File — Pick a file that is already in the client’s folder and select Run Test with Selected File. For a Client SFTP server mapping, this lists the files in the saved remote folder and reads the file you select from there, decrypting it first when Files are encrypted with GPG is on. Save the connection first; until then the dialog asks you to save it and does not list any files.
  • Upload File — Choose a file from your computer and select Run Test with Uploaded File. Excel workbooks and CSV and text files work. The file is read with the mapping’s parser type, the same way an import reads it: an Excel workbook needs a mapping whose parser type is Excel, and the test says so when the parser type does not match. A text file must use the encoding in the mapping’s parser configuration (utf-8 unless you change it); otherwise the test asks you to check the file’s encoding. A GPG-encrypted file is decrypted when the mapping is saved with Files are encrypted with GPG on. The file does not need to be on SFTP and its name does not need to match the filename pattern. A file over the upload limit is refused with a message giving the largest size allowed.

Set Maximum rows to test to limit how many rows are read. The results show whether the test passed, how many rows were read, any errors and warnings, and each row side by side as the original data and the transformed record.

Every test mode is a test only. Nothing is imported, no patients or other records are created, and an uploaded file is not saved or added to Accepted Files.

Loading Sample Rows into the Editor

Select Test Data in the editor header to load sample rows into the Source Data panel, where the live preview shows how each row maps. At the top of the Select Test Data panel, choose:

  • Select File — Pick a file from the client’s Incoming or Accepted folder.
  • Upload File — Choose a file from your computer. The parser settings currently in the editor decide how it is read, so you can adjust them and load the file again before you save. Excel, CSV, and text files work. A GPG-encrypted file is decrypted when the mapping is saved with Files are encrypted with GPG on.

Set Maximum rows to load, then select Load Data. Loading rows this way only reads the file. Nothing is imported and an uploaded file is not saved.


Incoming Files Tab

The Incoming Files tab lists files that have been uploaded to the SFTP and are waiting for EDI intake processing. These files have not yet been run through any mapping. As a tenant administrator you see only files under your organization’s client folders. As a global administrator you see every client’s waiting files.

The table shows each file’s client name (displayed as a chip), file name, file size, and upload timestamp. Select Refresh to reload the list with the latest files from the SFTP source.

If no files are shown, all files have either already been processed or no new files have been uploaded.


Accepted Files Tab

The Accepted Files tab shows files that have been accepted for processing. Each row shows the file name, its status, a Quality percentage when column validation ran during import, its size, and when it was accepted. Select a row to see its details and job progress. When import quality was recorded, the detail panel shows Rows seen, Rows imported, Rows skipped, Quality, and any Missing columns from the file header. Select Rerun Processing on a processed, failed, or errored file to run it through its mapping again.

The status is one of:

  • Accepted — The file is stored and processing has not started yet.
  • Queued — The file is waiting for its import to run.
  • Processing — The import is running.
  • Processed — The import finished.
  • Failed or Error — The import stopped or finished with an error. Open the file to read the error.

Sending a File Through for Processing

Use Upload File when a customer cannot drop a file on SFTP, or for a one-time import. Uploading a file for processing requires tenant administrator or global administrator access; anyone else sees a message saying so and nothing is uploaded.

  1. Select Upload File in the upper right of the Accepted Files tab.
  2. Under Mapping, choose the mapping the file belongs to. The list shows active file mappings only, each with its customer and client name. Inactive mappings and PharmPix mappings are not listed.
  3. Under File, choose the file from your computer. The hint under the field shows the largest file you can upload, and a larger file is refused before anything is sent.
  4. Select Upload.

The file name does not need to match the mapping’s filename pattern. That pattern is how a file dropped on SFTP is recognized; here you name the mapping yourself.

The file is processed the same way as a file that arrives by SFTP. It is accepted for the mapping’s customer and business units, the import starts right away, and the file appears on the Accepted Files tab with the same statuses. A message confirms the file was accepted.

If a file with the same name and size was already accepted for that mapping, the upload is refused and the dialog tells you the file was already taken. Select Open Accepted File to see that file, then use Rerun Processing on it to import it again. If the file is stored but its processing does not start, the dialog says so and the file appears on Accepted Files as failed. Select Open Accepted File, then use Rerun Processing to start it.

If the mapping is inactive, the customer’s tenant is inactive, or the file is larger than the upload limit, the dialog shows the reason (including the largest size allowed) and nothing is imported.

The Mapping list shows only mappings you are allowed to upload to.


Host Key Mismatch Bell

If an EDI mapping uses the Client SFTP server data source and you filled in Host Key Fingerprint (Optional) on that mapping, GEMA checks the server’s key before it connects. When the key a client’s server presents does not match the fingerprint on the mapping, GEMA does not connect and no files are pulled from that server.

The shield bell in the header is for global administrators in the platform operations view. A red number on the bell is the count of client servers whose key did not match. The bell shows no number when every server matches. Tenant administrators do not see this bell.

Select the bell to open EDI Host Key Mismatches. The list shows one row for each mapping with a problem:

  • Mapping — the name of the EDI mapping.
  • Host — the client server GEMA tried to reach.
  • Expected fingerprint — the fingerprint saved on the mapping.
  • Presented fingerprint — the fingerprint the server showed.
  • Last seen (UTC) — the most recent time the mismatch happened. This time moves forward each time the hourly pull tries again and the key still does not match.

If the client changed their server’s key on purpose, open the mapping, select Config, enter the new value in Host Key Fingerprint (Optional), and save. If you did not expect a change, confirm the new fingerprint with the client before you trust it. Once the server’s key matches again, the row removes itself and the count on the bell goes down. Deleting the mapping also removes its row.