Alpha Video Training
Results 1 to 9 of 9

Thread: Alpha five on the field

  1. #1
    Member
    Real Name
    Claudio Pilustrelli
    Join Date
    May 2019
    Posts
    4

    Default Alpha five on the field

    Hello. Long ago I developed an application with alphafive (9 for windows) for a friend he recently asked for a feature update.
    He is a doctor that work with a partner at small office. The application I developed is basically a database with medical history of patients.
    The problem is that one of the doctors sometimes goes out in the field to remote locations in other villages without reliable internet connections.
    So he wants to use the app on the field to enter information for new patients then go back in the office and update the office database with the new records.
    In the past he handle this with a simple backup utility, but now a partner might be in the office using the database and enter new patients or updating old ones.
    So in summary, what is the best pratice to update just the new records collected on the field on the main database. The main field now is patienID which is autoincremental
    Imagine that the last patient was number 5780. Then doctor goes in the field and open a new record for patient 5781 while the other doctor in the office do the same with a new patient which
    will have the same 5781 id. If he does a simple backup he will overwritte the records on the main database in the office.

    I am sure this is a basic feature, but I have not done any database development in years and now trying to help out a friend.
    Thanks so much for your suggestions!!

  2. #2
    "Certified" Alphaholic CharlesParker's Avatar
    Real Name
    Charles Parker
    Join Date
    Dec 2012
    Location
    New Orleans, LA
    Posts
    2,114

    Default Re: Alpha five on the field

    Using a version of AS that does NOT include offline capabilities: Probably what you should do is run some xbasic to do an SQL insert when you save. If you were running Alpha Anywhere this could all be handled fairly well with the built in offline functionality. I don't know how you would handle an edit to an existing record offline without a lot of comparing & accepting of edits, either theirs or yours...then using xbasic perform an SQL update
    If you're on a newer version that included offline capabilities, then you'll want to state the exact version your on. I don't know that it would make too much of a difference but often it does.
    NWCOPRO: Nuisance Wildlife Control Software My Application: http://www.nwcopro.com "Without forgetting, we would have no memory at all...now what was I saying?"

  3. #3
    Member
    Real Name
    Claudio Pilustrelli
    Join Date
    May 2019
    Posts
    4

    Default Re: Alpha five on the field

    Thanks Charles for your reply. The aplication was developed with V9 but if the current version (12) has the
    tools for doing this offline update i would consider upgrading.

  4. #4
    "Certified" Alphaholic Ted Giles's Avatar
    Real Name
    Ted Giles
    Join Date
    Aug 2000
    Location
    In the Wolds, Louth, Lincolnshire, UK
    Posts
    4,327

    Default Re: Alpha five on the field

    I did this for the UK NHS years ago.
    The easiest way is to;
    Export the records the partner needs to take away with them.
    Lock those records to prevent update.
    When partner returns, upload previously exported records after taking off the lock - changes will be applied or if no change, then the record stays the same.

    However, this does mean that none of the exported records can be changed until they are put back.

    New records are a different issue. I would suggest a temporary new patient ID which can be changed during the reimport process.

    If you need to do off line stuff, then you will need a web based app to run in offline mode of the device of choice I think you will find.
    Desk top doesn't do off line easily.

    Off line will give the same problems unless the Synch is robust.
    Ted Giles
    Example Consulting - UK
    .

    http://ec12.example-software.com//
    See our site for Alpha Support, Conversion and Upgrade.

  5. #5
    "Certified" Alphaholic CharlesParker's Avatar
    Real Name
    Charles Parker
    Join Date
    Dec 2012
    Location
    New Orleans, LA
    Posts
    2,114

    Default Re: Alpha five on the field

    I think the upgrade is worth it - but be very aware that you will want to recalculate your controls and test your application knowing that A LOT has changed and your application may not work as expected on first run. You may have some tweaking to do. I have seen where you might have to rebuild the same component from scratch but again, I think there are probably a lot of people who had zero issues. Good luck, and again I think for what your looking to do the upgrade will be worth it but there will be a learning curve!
    NWCOPRO: Nuisance Wildlife Control Software My Application: http://www.nwcopro.com "Without forgetting, we would have no memory at all...now what was I saying?"

  6. #6
    "Certified" Alphaholic Mike Wilson's Avatar
    Real Name
    mike wilson
    Join Date
    Apr 2005
    Location
    Grand Rapids, Michigan
    Posts
    4,188

    Default Re: Alpha five on the field

    Hello Claudio,
    What you have described I interpret as this:
    1. The work in the field will result in ENTERING NEW PATIENTS NOT UPDATING EXISTING PATIENTS to the database on the field computer.
    2. The work in the office could do both.
    3. The conflict you are concerned with is the possibility that two different people might be entered as new patients and have the same patienID and therefore the records are not unique to the auto-increment number.

    UNCERTAINTY: You wrote:
    "If he does a simple backup he will overwrite the records on the main database in the office". I am uncertain what you are actually doing when you use the term "simple backup". Are you intending to say "Update" or "Append" to the office database with the field computer records?

    There are several possible solutions, but it matters what method you are using the transfer records from your field computer to your office database. And "simple" is relative.
    Mike W
    __________________________
    "I rebel in at least small things to express to the world that I have not completely surrendered"

  7. #7
    "Certified" Alphaholic DaveM's Avatar
    Real Name
    Dave Mason
    Join Date
    Jul 2000
    Location
    Hudson, FL
    Posts
    6,011

    Default Re: Alpha five on the field

    A not so simple append operation would take care of it.
    copy the "in the field data" to another folder and append the records to the office db. Use unique. sounds like the id field is not the way to go, but id+lname should work.

    I am assuming dbf files. Process would be a bit different with sql
    Last edited by DaveM; 05-28-2019 at 04:22 PM.
    Dave Mason
    dave@aldausa.com
    Skype is dave.mason46

  8. #8
    "Certified" Alphaholic MoGrace's Avatar
    Real Name
    Robin
    Join Date
    Mar 2006
    Location
    Los Angeles
    Posts
    3,643

    Default Re: Alpha five on the field

    I doubt there is anything simple about this process if multiple tables are involved that must retain their link(s) to the patient table. It would be good to continue this discussion and have some sample data from the tables involved. I have a few ideas but without a sample app, we are leaving Claudio to figure this out on his own...
    Robin

    Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

  9. #9
    VAR
    Real Name
    Martin W. Cole
    Join Date
    Apr 2000
    Location
    Terrell, Texas (near Dallas)
    Posts
    5,950

    Default Re: Alpha five on the field

    I think it can be managed with what you have.

    Also, my sense is that you are not fluent enough with Alpha in later versions to do what has been suggested.
    You could hire someone who is very fluent with V12 to do this for you using sql and/or the web version.
    Cole Custom Programming - Terrell, Texas
    972 524 8714
    martin_w_cole@msn.com

    ____________________
    "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

Similar Threads

  1. variable field in Alpha Sports
    By tedsoileau in forum Alpha Five Version 9 - Desktop Applications
    Replies: 2
    Last Post: 06-03-2016, 12:26 PM
  2. alpha DAO and sql field names
    By Nick Oldfield in forum Alpha Five Version 10 - Desktop Applications
    Replies: 0
    Last Post: 06-28-2012, 03:38 PM
  3. Alpha sometimes creates a second link field
    By werder101010 in forum Alpha Five Version 10 - Desktop Applications
    Replies: 2
    Last Post: 09-03-2010, 07:37 AM
  4. Alpha 5 v.5 field printing
    By ghguardshack in forum Alpha Five Version 5
    Replies: 4
    Last Post: 04-02-2008, 04:19 PM
  5. Count for specific field - New to Alpha Five
    By Barry Melamed in forum Alpha Five Version 6
    Replies: 2
    Last Post: 12-10-2004, 11:40 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •