Skip to content

File-Based Data Integration Overview

Vim supports file-based integration for securely exchanging structured data over sFTP. This enables healthcare organizations to deliver care insights that are surfaced directly within provider EHR workflows at the point of care.

Integration begins with sharing data files formatted according to Vim’s schema. Each file is validated, filtered, and ingested into a secure, customer-specific namespace. As providers interact with insights in the application, Vim generates feedback files (passbacks) summarizing actions taken for customer to update their systems and keep future files in sync with the current state of the data.

This guide outlines the required setup, file structure, data specifications, and validation process needed to complete a successful integration.

Integration Flow Diagram

This page will outline in detail the requirements and deliverables for the file-based integration between Vim and a data connection.

Setting Up the sFTP Connection

The first step in enabling file-based integration is establishing a secure sFTP connection between the data connection and Vim. This connection supports bi-directional file exchange: from the data connection → Vim and from Vim → data connection.

Vim will be hosting the sFTP connection supporting public key-based authentication allowing a secure method for logging in via RSA SSH. This authentication method requires:

  • RSA SSH keys - The public key will be shared with Vim, while the private key will be used by the data connection to access the sFTP server
  • IP whitelisting - The data connection will share the IP addresses (up to 20) that should be allowed access to the server
  • Access details - Vim will provide the username and hosting URL

The sFTP server includes two folders:

  • from_<data_source_name> - Files the data connection sends to Vim
  • from_vim - Files Vim sends to the data connection

Preparing Your File

Before integration can begin, you’ll need to generate a data file that follows Vim’s formatting and schema requirements. This file should include the insights your organization wants to surface to providers, structured in a way that ensures accurate ingestion and display within the application.

The following sections outline supported file formats, naming conventions, configuration options, and required content structure.

File Format and Structure

Vim supports a ragne of file formats and configurations to meet various data sharing needs. The following requirements apply to all files submitted for ingestion:

  1. One file per data stream - Submit one file for Diagnosis Gaps and a second for all other insight categories
    • Patient demographic data can either be included in the same file as the insights or submitted separately as a dedicated member eligibility file
  2. File naming convention - Vim is expecting the following format: <customer_name>_<care_insight_data_type>_<yyyy-mm-dd>.<file_extension>
    • Accepted values for <care_insight_data_type>: diagnosis_gaps or care_insights
    • Use only lowercase letters and underscores; no spaces
    • Files not following this naming convention will not be processed
  3. File formats - Files should be submitted as .csv, .txt or .xls
    • Zipped files also accepted
  4. File delimiters - Either a comma or pipe (|) as the delimiter can be used
  5. Encoding - Files are expected to use UTF-8 encoding
  6. Delivery cadence - Files can be submitted on a daily, weekly, or monthly basis, depending on your organization’s preference

Field-Level Specifications

The following sections outline the field-level specifications for the two supported data types: Diagnosis Gaps and Care Insights. Each table defines the required fields, accepted formats, and display behavior to ensure data is correctly processed and rendered in the application.

Diagnosis Gaps File Schema

The table below outlines the required structure and accepted field-level specifications for submitting diagnosis gaps to Vim.

Field NameDescriptionRequired?TypeExpected valuesUI displayExample
patient_first_namePatient's first nameRequiredStringLetters onlyTRUEJohn
patient_last_namePatient's last nameRequiredStringLetters onlyTRUEDoe
patient_unique_idUnique identifier assigned by the customer for the patientRequiredStringLetters + digitsFALSE1234qwehce8fyw4fh
patient_dobPatient's date of birthRequiredDateYYYY-MM-DDTRUE1990-07-19
patient_insurance_idHealth plan member/subscriber IDAt least one of this, patient_ehr_id, or patient_zip_code is requiredStringFALSE123445455
patient_ehr_idUnique identifier from the EHR systemSame as aboveStringFALSEa1b2c3d4
patient_zip_codePatient's ZIP codeSame as aboveStringxxxxx or xxxxx-xxxxFALSE90210
patient_insurerInsurance provider nameOptionalStringFALSEUnited Health Care
patient_stateU.S. state of residenceOptionalString2-letter U.S. state codeFALSEFL
gap_unique_idUnique identifier per gap and patient assigned by the customer, representing a single gap card in the applicationRequiredStringUp to 50 charactersFALSEfhipdusnyr98cenv485j
gap_systemDDefines whether the diagnosis gap is represented by an HCC or ICD code and determines which of the two is considered the primary gap. The selected code will be displayed prominently in the application and reported when the gap is closedHCC, ICDFALSEHCC
hcc_codeHCC code to be displayed for the gapRequired if gap_system = HCCStringValid HCC codes per supported modelTRUE18
hcc_descriptionDescription of the HCC codeOptional (auto-populated if model is supported)StringTRUEDiabetes with chronic complications
icd_codeICD code to be displayed for the gapRequired if gap_system = ICDStringValid CMS ICD codesTRUEE11.21
icd_descriptionDescription of the ICD codeOptional (auto-populated if model is supported)StringTRUEDM with nephropathy
hcc_model_versionVersion of the HCC model usedRequiredEnumCMS-HCC V24, CMS-HCC V28, HHS-HCC V07, RX-HCC V08, CMS-ESRD-HCC V24TRUECMS-HCC V24
gap_typeIndicates whether the diagnosis is known or suspectedOptionalEnumKNOWN, SUSPECTEDTRUEKNOWN
gap_statusCurrent status of the gap (used for filtering)OptionalEnumOPEN, CLOSEDFALSEOPEN
gap_raf_valueRisk adjustment factor for the gapOptionalDecimalNumeric (e.g., 2.659)TRUE2.659
gap_sourceSource of the diagnosis gapOptionalStringTRUE2024 claims
last_recorded_dosMost recent date of service tied to the diagnosisOptionalDateYYYY-MM-DDTRUE2023-07-19
last_recorded_npiNPI of the provider for the last recorded serviceOptionalNumeric10-digit NPITRUE1234567890
last_recorded_npi_nameName of the provider for the last recorded serviceOptionalStringLetters onlyTRUEJohn Smith
notesFree-text field for context or commentsOptionalStringTRUEPlease address all suggested gaps
custom_field_<field_name>Additional custom field to be displayed with the insightOptionalStringTRUEcustom_field_<Total_RAF> 2.56

Care Insights Data Schema

The table below outlines the required structure and accepted field-level specifications for submitting additional care insightd, besides diagnosis gaps, to Vim.

Field NameDescriptionRequired?TypeExpected valuesUI displayExample
patient_first_namePatient's first nameRequiredStringLetters onlyTRUEJohn
patient_last_namePatient's last nameRequiredStringLetters onlyTRUEDoe
patient_unique_idUnique identifier assigned by the customer for the patientRequiredStringLetters + digitsFALSE1234qwehce8fyw4fh
patient_dobPatient's date of birthRequiredDateYYYY-MM-DDTRUE1990-07-19
patient_insurance_idHealth plan member/subscriber IDAt least one of this, patient_ehr_id, or patient_zip_code is requiredStringFALSE123445455
patient_ehr_idUnique identifier from the EHR systemSame as aboveStringFALSEa1b2c3d4
patient_zip_codePatient's ZIP codeSame as aboveStringxxxxx or xxxxx-xxxxFALSE90210
patient_insurerInsurance provider nameOptionalStringFALSEUnited Health Care
patient_stateU.S. state of residenceOptionalString2-letter U.S. state codeFALSEFL
insight_unique_idUnique identifier for the insight tied to the patientRequiredStringUp to 50 charactersFALSEfhipdusnyr98cenv485j
insight_categoryCategory of the insightRequiredEnumRISK, QUALITY, RX, SDOH, CARE MANAGEMENT, UTILIZATION, ADT, CLINICAL INSIGHTSTRUEQUALITY
insight_titleTitle of the insight as displayed in the applicationRequiredStringUp to 100 charactersTRUEControlling High Blood Pressure
insight_codeCode associated with the insightOptionalStringRecommended value from an official code setTRUECBP
insight_descriptionDescription of the insightOptionalStringTRUEAssesses adults 18–85 with hypertension and BP <140/90
insight_typeInsight type, program or standard (e.g., HEDIS, ACO)OptionalStringTRUEHEDIS
insight_medical_code_systemThe medical codes related to the insight (e.g. CPT/ICD). Each code must include system, code, and descriptionOptionalStringCPT II / ICD-10TRUECPT II / ICD-10
insight_medical_codeMedical code for the insightOptionalStringCPT II: xxxxF, ICD-10: Xxx.xxTRUECPT II: 3074F
insight_medical_code_descriptionDescription of the medical codeOptionalStringTRUESystolic BP < 130 mm Hg
insight_dateMost recent date tied to the insightOptionalDateYYYY-MM-DDTRUE2024-07-19
insight_provider_npiNPI of the provider associated with the insightOptionalNumeric10-digit NPITRUE1234567890
insight_provider_nameName of the provider tied to the insightOptionalStringLetters onlyTRUEJohn Smith
insight_sourceOrigin or source of the insightOptionalStringTRUE2024 claims
insight_required_actionExpected next step for the providerOptionalStringTRUESchedule follow-up
notesFree-text field for context or commentsOptionalStringTRUENeeds follow-up next visit
custom_field_<field_name>Additional custom field to be displayed with the insightOptionalStringTRUEcustom_field_<Total_RAF> 2.56

File Ingestion Process

Once a file is received via sFTP, Vim initiates the ingestion process. This process fully replaces any previously ingested data and ensures that only the most up-to-date records are visible in the Care Insights application. Partial ingestion is not supported. If the file fails validation or ingestion is interrupted, the existing data remains unchanged.

This section outlines how ingestion is executed, what validations are applied, and how customers are notified in the event of errors.

Validations and Error Handling

Before ingestion, Vim performs a series of validations to ensure the integrity and accuracy of the submitted file. If the file fails any of the criteria below, it will be rejected and not ingested. In such cases, the existing data in the application remains unchanged, and Vim will notify the data source with details about the issue.

Important note: Files that do not follow the expected naming convention will not trigger the ingestion process, but they are not considered failures and will not generate an error notification.

A file will be rejected if:

  • It is submitted in an unsupported format or delimiter
  • It is empty or missing headers
  • It is missing one or more required columns
  • Field types do not match the defined schema
  • Its size is more than 80% smaller than the previously ingested file

Additionally, individual rows within a valid file may be excluded from ingestion if:

  • Required fields are missing
  • Duplicate values are found for patient_unique_id or insight_unique_id
  • None of the following identifiers are provided: patient_insurance_id, patient_ehr_id, or patient_zip_code

Rows that are excluded will not appear in the application. Instead, they are returned to the customer in a gating file (described below) with specific rejection reasons for correction.

Failed Gating File

If any rows in the submitted file do not meet the required field-level specifications, Vim excludes them from ingestion and compiles them into a gating file. This file contains the same fields originally submitted by the data source, with additional metadata appended by Vim to support troubleshooting.

The gating file includes the following additional fields:

Field NameDescriptionRequired?TypeExpected valuesExample
vim_auto_generated_uuidInternal Vim UUID for the rowAuto-generatedStringUUID formata34f98fd-4938-4fd1-b27e-2b60cb3c02e3
vim_auto_created_load_tsTimestamp when the file was processed by VimAuto-generatedDateTimeYYYY-MM-DD HH:MM:SS2025-07-06 01:23:45
vim_auto_created_data_received_tsTimestamp when the file was receivedAuto-generatedDateTimeYYYY-MM-DD HH:MM:SS2025-07-06 00:45:12
vim_auto_created_filenameOriginal name of the uploaded fileAuto-generatedStringdata_source_2025-07-06_diagnosis_gaps.csv
failure_reasonReason the row failed ingestionRequiredStringMissing required field: patient_unique_id
This file is delivered to the data source via sFTP after each ingestion cycle. It enables teams to quickly identify and correct issues without blocking the ingestion of valid data.

Feedback Loop

Vim generates feedback files to share provider actions taken within the Care Insights application in a structured feedback files to the data source. These files help customers monitor engagement, track resolution, and update internal systems.

Feedback is delivered via the same sFTP connection and generated separately for Diagnosis Gaps and Care Insights.

Feedback File Format and Structure

Vim generates and delivers feedback files in a consistent format to support automated processing and reliable reconciliation. These files are shared with the data source via the same sFTP connection used for data ingestion.

The specifications below apply to all feedback files:

  1. File name - <customer_name>YYYY_MM_DD__HH_MM_SS<insight_type_name>_report.csv
  2. File type - CSV
  3. File delimiter - Pipe (|) is standard; comma (,) is also supported
  4. Cadence - Daily, weekly, or monthly — based on your preference
    • Recommendation: Align with your ingestion schedule to ensure a complete feedback cycle.
  5. Coverage timeframe - Can represent a single day, week, or month
    • Recommendation: Use a timeframe consistent with your file delivery cadence.
  6. Sending time - Scheduled for the end of the customer’s business day to ensure all provider actions are captured
    • Tip: Coordinate with your sFTP sync settings to avoid timing issues.

Feedback File Schema

The feedback passback files follow the structure below. Each row represents a single provider action.

The fields marked as “Always Included” will appear in every feedback file. Optional fields are included when relevant data is available.

Field NameDescriptionAlways Included?TypeExpected valuesExample
organization_nameName of the organization in sessionYesStringScott's Clinic
vim_organization_keyUnique identifier for the organization in VimYesString8i7owzgbgo6zJHYNxkNLRc
organization_tinsTINs associated with the organizationNoStringComma-separatedQwn479Ft954ojlj
ehr_typeThe EHR system in sessionYesStringeCW
user_first_nameFirst name of the userNoStringJohn
user_last_nameLast name of the userNoStringDoe
ehr_usernameEHR username of the userNoStringjohn.doe
user_npiNPI of the userNoNumeric10-digit NPI1848495833
user_rolesRoles of the user as defined in VimNoStringMedical Doctor
encounter_idEHR encounter ID associated with the sessionNoString859574
encounter_dateDate of the encounter (org timezone)NoDateYYYY-MM-DD2023-10-17
encounter_npiNPI of the provider for the encounterNoNumeric10-digit NPI1495738475
gap_systemCoding system of the gap (Diagnosis Gaps only)Yes for Diagnosis GapsEnumHCC or ICDHCC
gap_idUnique ID of the gap or insightYesString32fn48f
gap_codeCode associated with the gap or insightYesString82
gap_descriptionDescription of the gap or insightNoStringAssess Drug Dependence
selected_medical_codesCodes selected during the sessionNoStringComma-separated
action_timestampTimestamp of the provider actionYesDateTimeYYYY-MM-DD HH:MM:SS2025-07-06 08:42:22
action_typeType of provider actionYesEnumaccept, dismiss, Undoaccept
action_reasonReason selected for the actionNoStringADD
action_additional_commentsFree-text comments provided during the actionNoStringnot seen today
vim_patient_tokenEncrypted internal patient identifier (Vim)YesStringfj958tu94jgieorjf
patient_customer_idCustomer’s internal patient identifierYesString738463

Testing the Integration

Vim supports the data connections with the ability to perform end to end testing of the integration on Vim's mock EHR. If you wish to perform end to end testing in lower environments, please contact a vim representative.

Recommended: to be able to perform a production verification of the integration prior to the rollout, Vim supports adding dummy patients to the production file. A dummy patient should include the word "test" in the patient's first or last name.

Monitoring and Support

Vim is committed to knowledge and identify the root cause upon file ingestion failure within 24 hours from ingestion process start (excluding weekends).

For questions or technical assistance, contact Vim's Support Team at support@getvim.com.