Medtrack and HL7 SFTP Export

Medtrack and HL7 SFTP Export

Medtrack is a generic HL7 interface that sends ADT and DFT messages to a specified SFTP server. It was initially created to support the Medtrack billing system but will also support most other HL7 interfaces. Below is an example file and some helpful mappings to understand how QuickEMR populates the packets.

Example ADT - Patient Create/Update

  1. MSH|^~\&|QuickEMR|FF06|Medtrak|Medtrak|202405301646||ADT^A08|QEMR_202405301646_25490|P|2.3|||||US|||
  2. EVN|A08|202405301646||||
  3. PID|1|22775|||Washington^George^A||19700211|M|||123 Street St^Apt 213^Richmond^VA^23173|200-555-9381^PRN^test33@example.com||en^English|Single||||||||||||||
  4. PV1|1||FF06^QuickEMR Physical Therapy||12345678^Doctor^Tom|||||||||||||||||||||||||||||||||||||||||||||
  5. GT1|1|22775|Washington^George^A||123 Street St^Apt 213^Richmond^VA^23173|2005559381||1970-02-11 00:00:00|M||18|||||||||||||||||||||||||||||||||||||||||||||
  6. IN1|1|18338|1|Aetna PPO|987 Insurance Ave.^Miami^FL^39874||5697987989|12314534|policy name 1|||202401010000||||Washington^George^A|S|1970-02-11 00:00:00|123 Street St^Apt 213^Richmond^VA^23173|||||||||||||||||123141|||||||M||||||

Example DFT - Charges

  1. MSH|^~\&|QuickEMR|FF06|Medtrak|Medtrak|202406251550||DFT^P03|QEMR_202406251550_20156|P|2.3|||||US|||
  2. EVN|P03|202406251550||||
  3. PID|1|17564|||W'hite^Charles||||||||||||||||||||||||
  4. PV1|1||FF06^QuickEMR Physical Therapy|||||2085283613^Ortho^Jim||||||||||||||||||||||||||||||||||||||||||||
  5. FT1|1|26835||202406250000|202406251550|||||1|||||||||G00.2~A00.1~S00.00XA^Streptococcal meningitis~Cholera due to Vibrio cholerae 01, biovar eltor~Unspecified superficial injury of scalp, initial encounter^I10|2^Doe^John|||||97033^Iontophoresis^C4|GP~CQ~~
  6. FT1|1|26835||202406250000|202406251550|||||1|||||||||G00.2~A00.1~S00.00XA^Streptococcal meningitis~Cholera due to Vibrio cholerae 01, biovar eltor~Unspecified superficial injury of scalp, initial encounter^I10|2^Doe^John|||||97003^OT Evaluation^C4|GP~CQ~~
  7. DG1|1||G00.2^Streptococcal meningitis^I10||||||||||||||||
  8. DG1|1||A00.1^Cholera due to Vibrio cholerae 01, biovar eltor^I10||||||||||||||||
  9. DG1|1||S00.00XA^Unspecified superficial injury of scalp, initial encounter^I10||||||||||||||||

Segment Definitions

MSH - Message Header

  1. Constant: "|"
  2. Constant: "^~\&"
  3. Constant: "QuickEMR"
  4. Facility Code - The code field of the facility assigned to the given case record. E.g. "ABCT001". (See screenshot MSH.4)
  5. Receiving Application - Configurable in billing settings. Defaults to "Medtrak" (See screenshot MSH.5-6
  6. Receiving Facility - Configurable in billing settings. Defaults to "Medtrak" (See screenshot MSH.5-6)
  7. Message Date - The date the message was generated. Formatted: YYYYMMDDHHmm. Unless otherwise specified all dates will match this format.
  8. Empty
  9. Message
    1. Message Type - ADT or DFT
    2. Message Subtype - A08 for first ADT send. A04 for subsequent ADT sends. Always P03 for DFT messages.
  10. Message Control ID - A unique identifier. Should be unique for each message and contains parts "QEMR_{Date:MSH7}_{case_id}". The case id is the unique identifier for a patient episode of care (case) in QuickEMR and may be seen in the URL of the case. For the URL "https://server2.quickemr.com/DEMO001V8/case?case_id=2019" the case id is "2019".
  11. Constant: "P"
  12. Constant: "2.3"
  13. Empty
  14. Empty
  15. Empty
  16. Empty
  17. Constant: "US"
  18. Character Set: Packets will usually be base ascii but may occasionally contain UTF-8 characters.
  19. Empty
  20. Empty

EVN - Event Type

  1. Event Type: See MSH.9.2. Will always match. EVN Header may be safely ignored but is included in case it is expected.
  2. Message Date: See MSH.7. Will always match.
  3. Empty
  4. Empty
  5. Empty
  6. Empty

PID - Patient Information

  1. Constant: 1
  2. Patient ID - The patient code from QuickEMR. (See PID.2-3 Screenshot)
  3. Patient Account - The patients unique identifier in QuickEMR. (See PID.2-3 Screenshot)
  4. Empty
  5. Name
    1. Last Name
    2. First Name
    3. Middle Initial
  6. Empty
  7. Date of Birth - Date in the format YYYYMMDD like "20100101"
  8. Gender at Birth - "M" or "F"
  9. Empty
  10. Empty
  11. Address
    1. Address Line 1
    2. Address Line 2
    3. City
    4. State - 2 diget state code.
    5. Zip - 5 or 5+4 like "12345" or "12345-1234"
  12. Phone
    1. Number - 10 digits separated by dashes like "200-200-1234"
    2. Constant: "PRN"
    3. Empty
    4. E-Mail - An e-mail address like "test@example.com"
  13. Empty
  14. Language
    1. Language Code - ISO 639-1 Language code. Usually "en" occasionally "es".
    2. Language Description - The corresponding ISO 639-1 description. Usually "English", occasionally "Spanish".
  15. Marital Status
    1. Status ID - One of "Married", "Single", "Legally Separated", "Divorced", "Widowed", "Unknown", or "Not Applicable"
    2. Empty
  16. Empty
  17. Empty
  18. Empty
  19. Empty
  20. Empty
  21. Empty
  22. Empty
  23. Empty
  24. Empty
  25. Empty
  26. Empty
  27. Empty
  28. Empty
  29. Empty

PV1 - Patient Visit Information

  1. Constant - "1"
  2. Empty
  3. Patient Location
    1. Empty
    2. Empty
    3. Empty
    4. Facility - The "Other Code" field for the facility specified on the note. (See screenshot PV1.3)
    5. Empty
    6. Empty
    7. Empty
    8. Empty
    9. Facility Description - The full name of the facility specified on the note. (See screenshot PV1.3)
  4. Empty
  5. Empty
  6. Empty
  7. Empty
  8. Referring Physician - As specified on the case.
    1. NPI
    2. Last Name
    3. First Name
  9. Empty (9-53 are empty)

GT1 - Guarantor

  1. Constant: 1
  2. Guarantor ID - An id corresponding to the source record in QuickEMR. This may be a patient record or a guarantor record depending on the users preferences.
  3. Guarantor Name
    1. Last Name
    2. First Name
    3. Middle Initial
  4. Empty
  5. Guarantor Address
    1. Address Line 1
    2. Address Line 2
    3. City
    4. State - 2 digit state code.
    5. Zip - 5 or 5+4
  6. Home Phone Number - 10 digits with no separators. 
  7. Work Phone Number - 10 digits with no separators.
  8. Date of Birth - Date in format YYYYMMDD
  9. Gender at Birth - "M" or "F"
  10. Empty
  11. Relationship - 18: self, G8: Other
  12. Empty (12-55 are empty)

IN1 - Insurance Information

  1. Indicator - 1: Primary, 2: Secondary, 3: Tertiary. Up to 3 IN1 segments may be included but only one for each indicator.
  2. Policy ID - unique id for this plan.
  3. Payer ID - Unique ID for this insurance.
  4. Name - Name of the insurance company.
  5. Address
    1. Address Line 1
    2. Address Line 2
    3. City
    4. State - 2 digit code
    5. Zip - 5 or 5+4
  6. Insurance Contact Name
  7. Insurance Contact Phone Number - 10 digits no seperator
  8. Insurance Policy Group Number
  9. Insurance Policy Group Name
  10. Empty
  11. Empty
  12. Plan Effective Date - YYYYMMDDHHmm
  13. Plan Termination Date - YYYYMMDDHHmm
  14. Empty
  15. Plan Type - BC: Blue Cross, C: Champus/TriCare, F: FECA Black Lung, G: Group Health Plan, MC: Medicare, MD: Medicaid, CMD: Commercial Medicaid, MG: Medigap, WC: Workers’ Comp, O: Other
  16. Insureds Name
    1. First Name
    2. Last Name
    3. Middle Initial
  17. Insured Relationship - S: Self, O: Other
  18. Insured Date of Birth - YYYYMMDD
  19. Insured Address
    1. Address Line 1
    2. Address Line 2
    3. City
    4. State - 2 letter code
    5. Zip - 5 or 5+4
  20. Empty
  21. Empty
  22. Empty
  23. Empty
  24. Empty
  25. Empty
  26. Empty
  27. Empty
  28. Empty
  29. Empty
  30. Empty
  31. Empty
  32. Empty
  33. Empty
  34. Empty
  35. Empty
  36. Insurance Policy Number
  37. Empty
  38. Empty
  39. Empty
  40. Empty
  41. Empty
  42. Empty
  43. Insureds Gender - M, F
  44. Empty
  45. Empty
  46. Empty
  47. Empty
  48. Empty
  49. Empty

FT1 - Financial Transaction

  1. Constant - 1
  2. Transaction ID - The unique note (encounter) ID from within QuickEMR
  3. Empty
  4. Date of Service - YYMMDDHHmm
  5. Date Signed - YYMMDDHHmm
  6. Empty
  7. Empty
  8. Empty
  9. Empty
  10. Units - Quantity of this charge
  11. Empty
  12. Empty
  13. Empty
  14. Empty
  15. Empty
  16. Empty
  17. Empty
  18. Empty
  19. Diagnosis Code - Repeating
    1. Code - ICD 10 code with decimal after 3 digits
    2. Description - Standard ICD 10 code description.
    3. Constant - "I10"
  20. Rendering Provider
    1. ID - The unique user id from within QuickEMR
    2. Last Name
    3. First Name
  21. Billing Provider
    1. ID - Tax ID
    2. Company Name
    3. Empty
  22. Empty
  23. Empty
  24. Empty
  25. Procedure Code
    1. Code - CPT4 code
    2. Description - User provided description
    3. Constant - "C4"
  26. Modifiers - Repeating
    1. Code
    2. Empty
    3. Empty

DG1 - Diagnosis Code

  1. Constant - 1
  2. Empty
  3. Diagnosis Code
    1. Code - ICD 10 Code
    2. Description - Standard ICD 10 Description
    3. Constant - I10
  4. Unused (4-19 are unused)

Screenshots

MSH.4

MSH.5-6


PID.2-3


PV1.3

    • Related Articles

    • QEMR Native (Self Pay Billing Management System)

      **This system is for facilities that ONLY accept cash-pay patients and is not yet intended for facilities that are submitting claims to insurances** Enabling QuickEMR Native: Where to go? 1. The Quickemr Native system can be enabled by going under ...
    • APTA Mips API Integration

      You must be using QuickEMR Version 8 to integrate with APTA. Obtain SFTP information and enter it at “Settings” => “Documentation” => “Outcomes Type” => “APTA” => “APTA Host” and save. Past data may be manually exported by visiting “Reports” => ...
    • FOTO Integration Part 2: Usage

      Mappings QuickEMR Patient => FOTO Patient QuickEMR Case => FOTO Episode QuickEMR Note => FOTO Encounter Create a new patient or visit an existing patient not connected to FOTO. FOTO requires several fields that are optional in QuickEMR. Before ...
    • Making the Guarantor for Minors and Signature Assignment Required before Exporting

      A few optional validation rules can be applied before exporting a note. Validation Rules: Where to go? 1. This can be found under Settings -> Validation 1. Check marking the following validation rules will require this information before a note can ...