Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

unique number required

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    unique number required

    hello, i am new in alpha5 and planning to create a database for my clinic. I would like to create sequential number such as 10000-001, 10000-002 etc. The first digits are from patient id or record no. While the last digits are from patient's visit frequency times. I have browse through the forum, could not find any answer.
    Any help would be appreciated.

    #2
    Re: unique number required

    Try

    Code:
    alltrim(patient_id)+"-"+increment_value(padl(alltrim(str(tablecount("[COLOR="Red"]yourtablename[/COLOR]","patient_id ="+quote(patient_id)),3,0)),3,"0"))
    Substituting your actual tablename, assuming the patient id field is named patient_id.

    If you want a version that can be applied retroactively to existing records.

    Code:
    ALLTRIM(PATIENT_ID)+"-"+INCREMENT_VALUE(PADL(ALLTRIM(STR(TABLECOUNT("yourtablename","patient_id ="+QUOTE(PATIENT_ID)+".and. recno()<"+RECNO()),3,0)),3,"0"))
    These would be used as the expression for a calculated field.
    Last edited by Stan Mathews; 10-29-2007, 09:23 AM.
    There can be only one.

    Comment


      #3
      Re: unique number required

      Hello Stan,

      Thanks for the help. However, the script in the calculated field gives an error of "argument is incorrect data type".
      I create 2 simple table, one with Patient_id and another Treatment table with treatment_id and treatment_code fields. I would like to generate a treatment_code = patient_id-treatment count(visit), such as
      1000-01,
      1000-02,
      1001-01, 1001-02, 1001-03 etc

      I just bought the license Alpha5 a week ago, and trying my best to learn the program and its Xbasic from the help and some tutorial from Alphasoftware website.

      Any help is appreciated.

      Comment


        #4
        Re: unique number required

        Originally posted by adamry View Post
        However, the script in the calculated field gives an error of "argument is incorrect data type".
        What is the type of

        Patient_id
        treatment_id
        treatment_code

        I can't see why any would be numeric since you aren't going to perform any math calculations with them.

        Try entering treatment records in my example attachment
        Last edited by Stan Mathews; 10-30-2007, 08:34 AM.
        There can be only one.

        Comment


          #5
          Re: unique number required

          Hi Stan,

          Thanks a lot. I manage to solve the problem after i use character type in the field.
          However, i am not able to view your zip files, as it is a php type. When i browse using the browser, url not found. How to view the attachments? I did download the PHP file from PHP.net website, its quite complicated. Any other way?

          Thanks again for your great help.

          Comment


            #6
            Re: unique number required

            When I click on the attachment link I am offered the option to open, save, or cancel. When I choose open, I am presented with the contents of the compressed file. When I choose save, I can choose where to save it. After saving it you need to expand the zip, note where you save the uncompressed version, open Alpha, navigate to the saved location, open the database.
            There can be only one.

            Comment


              #7
              Re: unique number required

              Hi stan,

              Thanks again. Now i really know how to view other attachments from the forum.
              I hope to create a clinic management software to replace my old one which was created with clarion 5.
              Meantime, i will continue learning and practicing the Alpha 5 and its Xbasic codes.
              Do you know any software or program that can convert my database files (.tps type) into other format? (apart from the clarion software and drivers which i don't have.)

              Comment


                #8
                Re: unique number required

                Googling ".tps" led me here.
                There can be only one.

                Comment


                  #9
                  Re: unique number required

                  Hello Stan,

                  I have seen this site before. Probably i have to contact softvelocity myself to get the Topscan files.

                  Thanks again.

                  Comment


                    #10
                    Re: unique number required

                    Razali,

                    If you find a way to use your TPS files please post it--I checked into this a while back and the only sure way was to purchase the Clarion TPS Drivers--about $600. US dollars at the time. I found a TPS reader that allowed me to see a very small amount of the .tps files but not good enough to export from. The program I use luckily was updated and now allows me to export or report to a HTML file--I can then import this into Excel and from Excel into Alpha. Luckily it will only be a one time import once I complete my current application that is going to replace the one built with Clarion.
                    Mike
                    __________________________________________
                    It is only when we forget all our learning that we begin to know.
                    It's not what you look at that matters, it's what you see.
                    Henry David Thoreau
                    __________________________________________



                    Comment


                      #11
                      Re: unique number required

                      Hi MikeC,

                      At present the only way to convert my TPS files is to post the files to the programmer / developer who promised me to convert it. However, I have to wait until my Alpha database is ready. Hopefully by that time, they still around. Otherwise i have to pay for the Topscan driver from Softvelocity.
                      I have been using their clinic management program since 1998. Last month, they told me that they wanted to stop their service and support. After searching the internet, i found Alpha 5.
                      If i found any other way to convert these files, i will post it here.

                      Comment


                        #12
                        Re: unique number required

                        Razali,

                        Not my program but I would not create an ID like that. This is a Visit record table, so I would have a VisitID and a PatientID. The VisitID would just be a meaningless sequential number, and the PatientID would be whatever patient was visiting. You don't lose anything by going this way. You can still count up how many visits they have made, list them in order, give them "Visit Numbers" such as Visit 1, Visit 2, etc on a report. The method you are chasing may come back to bite you because it HAS TO BE maintained with much more precision than what I suggested.
                        Steve Wood
                        See my profile on IADN

                        Comment


                          #13
                          Re: unique number required

                          Hi Steve,

                          I accept your suggestion.
                          In my clinic setup, patientID = Registration iD (eg 1000). When patient entering the consultation room, his/her ID would be 1000-01 or 1000-12. A doctor who see this number would immediately know that the patient is either a new case or his 12th visits. If this is a new case, doctor would not bother to look at his past treatments. Most of the time, patient sit near the doctor and he saw the screen and contents. I would rather prefer having display 1000-01 than visit no or a new case etc.
                          I use the ID for treatment_code so that i sort the record by code rather than by date / patientID.
                          When invoicing to panel company, doctor and the company's administrators can immediately figure out how many times their employee visit the clinic.
                          In fact, this ID help doctor save his time, spend more time with patient rather than computer and more importantly know his patient better.

                          Of course PatientID or Registration No is the most important.

                          Thanks for the suggestion.

                          Comment

                          Working...
                          X