Patient Import

Discussion in 'General Discussion' started by Graham, Sep 30, 2006.

  1. Graham

    Graham Developer Staff Member

    <table border="0" cellpadding="12" cellspacing="0" width="100%">
    <tbody><tr>
    <td>


    This is a sample data spec we have been sent to use to import patients from another source. In this case, it was a billing program, and is in CSV or comma separated values format.The next version of Synapse-EMR will allow clients to import patients this way.Updated: 12-Oct-2006 - date of birth is now mmddyyyy without the "/" or "-" separators.Updated: 17-Oct-2006 - chart id can now be alpha-numeric<div><p align="center" style="text-align: center">


    <p align="center" style="text-align: center">Layout Specification


    Each record (patient) must end with a
    carriage
    return/line feed.
    <p style="margin-top: 6pt">
    <table border="1" cellpadding="0" cellspacing="0" style="border: medium none ; border-collapse: collapse">
    <tbody>
    <tr>
    <td style="border: 1pt solid black; padding: 0in 5.4pt; background: #e5e5e5 none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial" valign="top">

    <p align="center" style="margin-top: 6pt; text-align: center">Name
    </td>
    <td style="border-style: solid solid solid none; border-color: black black black -moz-use-text-color; border-width: 1pt 1pt 1pt medium; padding: 0in 5.4pt; background: #e5e5e5 none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial" valign="top">
    <p align="center" style="margin-top: 6pt; text-align: center">Type
    </td>
    <td style="border-style: solid solid solid none; border-color: black black black -moz-use-text-color; border-width: 1pt 1pt 1pt medium; padding: 0in 5.4pt; background: #e5e5e5 none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial" valign="top">
    <p align="center" style="margin-top: 6pt; text-align: center">Remarks
    </td>
    </tr>
    <tr>
    <td style="border-style: none solid solid; border-color: -moz-use-text-color black black; border-width: medium 1pt 1pt; padding: 0in 5.4pt" valign="top">
    <p style="margin-top: 2.9pt">Last Name
    </td>

    <td style="border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt" valign="top">
    <p style="margin-top: 2.9pt">Text
    </td>
    <td style="border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt" valign="top">
    <p style="margin-top: 2.9pt">Patient&rsquo;s last name. No commas or apostrophes.
    </td>
    </tr>
    <tr>
    <td style="border-style: none solid solid; border-color: -moz-use-text-color black black; border-width: medium 1pt 1pt; padding: 0in 5.4pt" valign="top">


    First
    Name
    </td>
    <td style="border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt" valign="top">



    <span style="font-size: 1
  2. Jason

    Jason Developer / Handyman Staff Member

    [quote user="Graham"]<p style="margin-top: 6pt">NOTE: Even if you do not send information in a field, it must be surrounded by double quotes to ensure error-free importing of patient information.

    [/quote]

    what do you mean by it ?

    Do you mean if there is a blank field, you must use double quotes ?

    Do you mean that all strings must be surrounded by double quotes ?
  3. Graham

    Graham Developer Staff Member

    Yes, empty fields need to be enclosed by double quotes.

    Here's a sample line

    "STOUT","HARLAN",""," 309163","123 LANDALE LANE","EL CAJON","CA","92019","502456712","(619)555-5476","( ) - 0","08011926","M","MEDICARE","AARP HEALTH CARE OPT","","","","BEWELL","MAKUS","","JACOBSON","MARK","","10022006","09:00AM","15"," 1","STANLY STEEMER","","RCK","","ADD"


    The latter fields are ...create an appointment with Dr Stanly Steemer for 2-Oct-2006 at 9:00 for 15 mins for a ReCheK.

    Once this has been tested more, the full specification for the import will be described here.
  4. Jason

    Jason Developer / Handyman Staff Member

    Does Excel's .csv files have double quotes surrounding everything ?
  5. Graham

    Graham Developer Staff Member

    No, but this was the format specified by the PMS/billing company we are dealing with. The CSV format specifies that quotes are really only required around fields containing a ",". If the field contains a ' " ', then it should be escaped with a ' " '.


    However, I think it may work fine without the quotes on everything [;)]
  6. DrO

    DrO New Member

    I want to enter most of the patient demographics without having to
    type the data again. I use Medisoft v9 SP2 for my billing. I do not
    want to interface Medisoft directly with Synapse.

    I extracted the patient database, MWPAT, into an Access file, filtered those patients not active as of 01/01/06. Exported this file to an Excel file.Cleaned it up, removed extra fields, and saved it as a csv file. In EDITPAD Pro I prepared the file according to your specifications.


    I have tried multiple permutations of my csv file to no avail. With quotes around the fields the program accepts the first line, even when it displays the correct # of lines, 292. This is the permutation, between ( ):


    ( "LLLLL","FFFF","","ABRRO000","3213 W. CASS ST.","CCCCC","SS","ZZZZZ","SSSSSSSSS","(PPP)PPP-PPPP","","05271941","F","Medicare","","","","","Rodriguez","Osvaldo","","","","" )

    It reported:

    Passed ABRRO000 as PMS ID and not integer value

    My records IDs are based on LLLFF000, i.e., for Mary Peter id is PETMA000. The program showed the correct data for this patient. I then tried to enter each record individually to no avail.

    I decided to eliminate the record #

    ( "LLLLL","FFFF","","","3213 W. CASS ST.","CCCCC","SS","ZZZZZ","SSSSSSSSS","(PPP)PPP-PPPP","","05271941","F","Medicare","","","","","Rodriguez","Osvaldo","","","","" )

    an received the following reply:

    make object! [
    code: 329
    type: 'script
    id: 'bad-bad
    arg1: "ODBC"
    arg2: {[ODBC Firebird Driver][Firebird]violation of PRIMARY or UNIQUE KEY constraint "INTEG_165" on table "USERS"}
    arg3: none
    near: [insert db-port [{insert into users (userid, fnames, surname, gender, dob, salut, reminder, answer, pass, occupation, ethnic, ssn, street1, street2, town, city, state, zip, security, workph, homeph, cellph, email, altcontact, altph, relation, location, activ, phcp, abook, pmsid ) values ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? , ?, ?, ? ) }
    userid fnames surname gender dob salut "" "" pass occupation ethnic ssn street1 street2 town
    city state zip 0 workph homeph cellph email altcontact altph relation location activ sid mold/all abook pmsid
    ]]
    where: 'add-zybex-patient
    ]

    street2 does not appear in the layout specifications!?

    What am I doing wrong?

    I would appreciate your help. Thank you,


    DrO

  7. Graham

    Graham Developer Staff Member

    Hi DrO

    The interface specification I was given said that the PMS chart ID has to be numeric, *but* your data has in the first instance tried a alpha-numeric value viz "ABRRO000", and the second time, blank viz "". So, it won't work.

    Street2 appears in the database schema, but not in the import specification because it was not needed.

    Since there is no overwhelming reason to ensure that the PMS chart ID is numeric ... I shall see if I can change Synapse to allow alphanumeric as well. Give me a day or two to make this change.

    Or, as a trial, you could create an autoincrementing field in Excel for the chart ID and see if that works for you.
  8. Graham

    Graham Developer Staff Member

    Ok, I have spent a few hours this morning rewriting the client and server to accept alphanumeric patient ids when imported from a CSV file.

    Please try this beta versions out at http://www.compkarori.com/emr/beta/

    Download and copy the server over the existing server, and use the new client 192 beta-1, and let me know if it works for you.

    BTW, I tried your sample data below with the beta versions,


    "LLLLL","FFFF","","ABRRO000","3213 W. CASS ST.","CCCCC","SS","ZZZZZ","SSSSSSSSS","(PPP)PPP-PPPP","","05271941","F","Medicare","","","","","Rodriguez","Osvaldo","","","",""

    and the import worked fine.
  9. DrO

    DrO New Member

    Thank you!

    It works like a charm. In less than 2-3 seconds the 292 records were imported. Upon reactivation the data imported was still there.

    DrO

  10. Graham

    Graham Developer Staff Member

    That's good news.

    I note that you are using Medisoft and are not interested in an interface. We don't have one yet ... but any reason why you don't want one?
  11. DrO

    DrO New Member

    Economics!

    The Medisoft ->NDCHealth ->PerSe transition in 3 years. The HIPPA changes and now the required use of the NPI coupled with a new 1500 form. Although, these required minor changes in the program, they were issued as new releases instead of updates. The price of Medisoft doubling with each new release. I would have gladly paid for a reasonably priced update.

    However, I would be very happy if you rigged an interface to import the data straight out of Medisoft. I would use Medisoft to enter the demographics and Synapse the Notes.

    Thanks

    DrO

  12. Graham

    Graham Developer Staff Member

    Ahh... didn't realise that was happening.

    Medisoft import is on my todo list .. just not sure when I'll be able to get around to doing it.
  13. cableops

    cableops New Member

    I'm getting errors when attempting to import this file. I've tried it with both the Import function and the PM inbound interface.

    I'm using Client 198. Server 0.0.70


    "ALLEN","LAKARRA","L","1133767","13962 LEATHERGLASS","CORSICANA","TX","75110","000008123","9032292440","","08112006","F","TMHP TEXAS HEALTH STEPS","undefined","","","","SMITH","JOHN","","WHITE","ERIC"



    This is the error message from Synapse:


    make object! [
    code: 329
    type: 'script
    id: 'bad-bad
    arg1: "ODBC"
    arg2: {conversion error from string " "}
    arg3: none
    near: [insert db-port [{insert into users (userid, fnames, surname, gender, dob, salut, reminder, answer, pass, occupation, ethnic, ssn, street1, street2, town, city, state, zip, security, workph, homeph, cellph, email, altcontact, altph, relation, location, activ, abook, cpmsid ) values ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? , ?, ?, ? ) }
    userid fnames surname gender dob salut "" "" pass occupation ethnic ssn street1 street2 town
    city state zip 0 workph homeph cellph email altcontact altph relation location activ mold/all abook form pmsid
    ]]
    where: 'add-zybex-patient
    ]
  14. Graham

    Graham Developer Staff Member

    This is an odbc conversion error ... so, one of the fields is not the right data type for the database. Which is odd since your data works for me!

    This suggests that possibly your database somehow has an incorrect field type.

    Could you dump the metadata for the users table definition here?

    Also, I have uploaded a beta server http://www.compkarori.com/beta/synapse-server.exe 171 beta-1 which on the server console dumps the values as massaged by Synapse client prior to inserting into the table to see if you can see an error in the conversion.

    This is what I see:
  15. cableops

    cableops New Member

    I can't seem to download the Beta Server 171

    Do I have the correct URL?

    http://compkarori.com/beta/synapse-server.exe



  16. Graham

    Graham Developer Staff Member

  17. cableops

    cableops New Member

    Finally got the 171 server build in place.

    I got the same error as before. Below is the metadata from the server screen.



    ]
    surname: "ALLEN"
    fnames: "LAKARRA L"
    userid: "1133767"
    pmsid: "1133767"
    street1: "13962 LEATHERGLASS"
    state: "TX"
    zip: "75110"
    ssn: "000008123"
    homeph: "9032292440"
    workph: ""
    dob: 11-Aug-2006
    gender: "F"
    primaryinsurance: "TMHP TEXAS HEALTH STEPS"
    secondaryinsurance: "undefined"
    physician-lastname: "SMITH"
    physician-firstname: "JOHN"
    referring-physician-lastname: "WHITE"
    referring-physician-surname: "ERIC"
    raw message
  18. Graham

    Graham Developer Staff Member

    Ok. I still need to see the database table metadata, or definition.

    You can use a program like IBOconsole to login to the Firebird database and examine the users table and grab the sql metadata.

    This is to see if your table is correct or needs updating.

  19. Graham

    Graham Developer Staff Member

    I was not able to add a patient even thru the normal add patient interface which suggests that the database you sent me is corrupted.

    You could try one of the Firebird database repair utities, or, just download a new blank database since you only have the one patient in it.



  20. DrO

    DrO New Member

Share This Page