October 28, 201411 yr Hello, I have created a database with a bunch of patients. Each patient has a unique hospital number put on their charts. This number is usually assigned to them once they are registered in hospital. In some cases we like to keep track of people who donate bone marrow to another patient and they want to remain anonymous. In this case, we would put a "dummy" number in the hospital number field. I would like to make a value list of a bunch of dummy numbers that would come up in a dropdown for patients with this case. This is very easy as I can make a value list but my problem is that I want the dummy numbers to be eliminated from the value list once used, that way they are unique. In other words, I want only the unused dummy numbers to show up in the value list. If anyone can help me with this that would be great. Thank you!
October 28, 201411 yr Wouldn't it be simpler to generate a dummy number on demand? I mean why would you want to pick a specific dummy number from a list? Is there a choice that is better than any other?
October 28, 201411 yr Author I could do that too and if they have a hospital number they can replace it but can It be unique. For example, generate the number 0000001, next would be 0000002?
October 28, 201411 yr Don't you already have your own, auto-generated serial number PatientID? Or you could just use Get ( UUID ).
October 28, 201411 yr Author Yes I do already have an auto serial number, but the docs want everything to look streamlined. Since the format for the hospital number is #########, they want the dummy hospital numbers to be the same. Is it possible to do this? I know seems weird but I do what the boss says. hahah
October 28, 201411 yr SerialIncrement ( "000000000" ; PatientID ) will get you there. Or, if you want to smarten it up, you could use: Right ( Year ( Get (CurrentDate) ) ; 2 ) & SerialIncrement ( "000" ; DayOfYear ( Get (CurrentDate) ) ) & SerialIncrement ( "0000" ; PatientID ) Note: the target field must be of type Text.
Create an account or sign in to comment