What is the valid range for IMSI numbers - telecommunication

I want to validate International mobile subscriber identity (IMSI) numbers. What is the valid range of IMSI numbers? Please let me know about specification or any web link.

I'm not sure this question has an answer, as this number is both highly dependent on each country's independent numbering plan .
The first 5 digits of the IMSI consists of an MCC (Mobile Country Code) + MNC (Mobile Network Code) combination of which, according to this site, there are 1663 entries as of 3/24/2016. These combinations are not sequential and were designed to accommodate natural population growth. So the sequences skip around somewhat arbitrarily mainly because they mostly are.
The remaining 10 digits are the MSIN (Mobile Subscriber Identification Number), which is basically a phone number. This number is regulated by each country's numbering plan, which vary considerably from country to country.
So, there's really no cohesive rule you can use to verify IMEI integrity, other than some sort of database lookup.
Wish you luck in your search and your project!

Related

Algorithm to match IBAN to BIC

I'm trying to find a solution to convert IBANs to BICs.
In theory, all I need is to have a db with national bank codes and their BICs to compare these national codes with corresponding ones in IBANs (based on IBAN format for that country described in https://www.swift.com/sites/default/files/resources/swift_standards_ibanregistry.pdf). But the problem is, that I can only find limited and not accurate sources of national bank codes (or can't find at all, even for big ones).
Is there a way to find a BIC number for a given IBAN in another way? I also thought about first 4 letters in a BIC code, which represents financial institution - but I did not find if it's possible to convert them to "national" codes or vise versa).

"IF" function for analysis of hospital lab frequency

I work for a hospital that is part of a larger network. We were recently asked by our corporate overlords to address the use of a specific laboratory test. in general, this test should only be performed daily, which should be considered to corresponded to a 24 hour period from last draw. sometimes, however, based on when people arrive to the hospital (e.g. 7pm), and in the interest of bundling labs for a single draw, they may be drawn sooner to coincide with routine testing i.e. 5am. it would never be necessary to otherwise need to repeat within a short (8 hour) window, particularly on the same day.
we have been asked to validate to see if we are adhering to this general practice, as testing any more frequent than that, say, within 12h of a previous test, has no real clinical value and thus adds unnecessary cost.
To address this issue I was given a dataset that among other items includes all instances the lab was performed including collection date and time.
please see HIPPA-safe example below (to be clear, no real data and identifiers are not real); the actual dataset has over 4,174 entries corresponding to 1,328 unique persons. everyone had at least one test performed, not everyone had >1.
I THINK what I want to do is an IF formula that reads the antecedent cell to 1) check if same person and 2) if so, perform a subtraction of the time stamp to display the relevant difference in time, which I can then filter, create histogram, etc. does this seem like a reasonable approach? is there a more preferable method to facilitate analysis? do any other forms of analysis come to mind?
=IF(B2=B1, D2-D1, "n/a")
example data set with formula:
any other forms of analysis come to mind?
By the looks of it you should consider taking the values under "Results" into account, assuming there is a band that might be considered 'normal' readings. The "one in 24 hours is sufficient" rule of thumb may well be appropriate for a series of values within the 'normal' band but not so much so if readings are close to 'danger level'.
That is, in some cases a higher than 'standard' frequency of monitoring may be in the patient's interest, even if not hospital policy, so it may be worth separating the "less than 24 hours interval" readings into those where the higher frequency provided information of little value (eg readings remaining within a 'normal' band) from any that crossed into or out of the band and/or large changes in value. This though may be more a matter of statistical analysis than programming and depend upon whether any action might be taken as a result of such "extra" readings.

Calculate most common time of day from spreadsheet values

Preliminary
This question applies to any spreadsheet system. I would like help in breaking down the problem, as opposed to an answer to the problem. (Although the latter would be most useful.)
I understand Stack Overflow is good for specific programming problems, and I understand it may take me a few attempts to get my question right, so please help me clarify my question by providing suggestions and I will update it.
Like many data novices I have good experience with discreet data (e.g. how many enquiries last month), but I struggle to understand how to deal with continuous data (e.g. how to discover patterns, and where the criteria for a query are not yet known).
The question
I have a spreadsheet where each row represents a "website enquiry". There is a datetime column, and I'd like to discover patterns in this data, to answer questions like:
what is the most common time of day to receive an enquiry
what is the most common day of the week to receive an enquiry
other useful information I can glean from the data, to allow me to target possible customers
This would be similar to the functions you often see in Social Media analytics, such as "best time to tweet".
I understand that calculating the most common day of the week is very simple, as days are discreet objects. So I don't need help with this!
I would like to avoid simply splitting up the day into four arbitrary time periods (e.g. breakfast, lunch, dinner, nighttime) and counting the number of rows that fall into these bounds. What if these time periods are not best to use to segment the data?
Is there another way, other than quantizing my data using arbitrary bounds?
You could use clustering to find out what the most common times are. Basically, you compare the time separation of enquiries and cluster them just like discrete 1D set of numbers using, for example, the average linkage clustering criterion. As you reach a reasonably small number of clusters, you will start to see the most dominant times of day (and if you want to evaluate those, you can take the time values which are the weighted centres of the biggest clusters).

Elegant and functional solution to linear optimization constraint?

Assume you have a linear optimization problem where you are trying to determine which attendees of a corporate event qualify to go through to the VIP event. You are trying to maximize a pre-defined utility, where each attendee has a particular utility, subject to a number of constraints which include:
No more than 4 people from any company at the VIP event
At least 4 companies represented at the VIP event.
Assume you have 400 attendees and only 10 can attend the VIP event, and there are employees from at least 50 different companies to choose from.
I have set up my problem in excel, where I have a row for each attendee, and a binary column for my linear optimization program’s ‘changeable cells’, where 1 is selected if the attendee is chosen for the VIP event and 0 otherwise.
What code can I then write to satisfy the above constraints?
What I have tried so far…
Currently my only solution for dealing with the first constraint listed above is to have 50 additional binary columns (one for each company) where if an attendee is going to the VIP event and they are from the company represented in that particular column, it will list a ‘1’, and ‘0’ otherwise. Then have another 50 cells that sum each column and then set a constraint that says those cells must be less than or equal to 4.
I feel there must be a more elegant and efficient way of doing this however.
I also cannot currently think of a way to write the code to satisfy the second constraint. I have tried having a separate column that displays company names when the changeable cell equals 1, then counting the number of unique values in that column, and then applying a constraint to that cell such that it must be greater than or equal to 3, but apparently that is a “non-linear” constraint.

MS Access 2003 - Calculating an average based on qty sold/per site with supply %

Here is another question I have about being able to calculate this scenario in Access, or even at all for that matter:
I have a query that find the TOP 5 items sold in a given timeframe, and it groups by site. I use this to create a comparative chart between the site for ppt presentations. I do a lot of these but I have a problem with the presentation that I foresee they will have a problem with and it makes for bad metrics:
Some stores are bigger than others, and get much more supply. So a straight aggregate total of just qty of toping selling items, and comparing the locations is stacking the deck a little.
So if Site A gets 80% of the supply, and sells 500, Site B gets 15% supply and sell 75, and site C get 5% supply and sells 50 items, then Site C actually has the best sales for their size. I have exactly what I need in terms in the first chart (from my queries and such) to show the aggregate total, but what do I need to represent the idea mentioned above.
The factors that I have that go into this are:
ItemID - group by
Item - group by
qty sold - sum/descending (which is the variable that determines the Top 5)
Store/Location - Group By
and then I run a seperate query to get the total deliveries (supply) to each site
I realize that this may just be a lack of mathmatical understanding on my part, but can anyone help with this?
thanks
The first issue that I see isn't about SQL savvy; it's how to serve your data customer. What does he or she want to see? Metrics is a term with a holy ring, and for good reason: it's supposed to be what is used for the big business decisions, and it's scary easy to measure the wrong thing.
So I'd make sure I know what my customer wants. If you can't model it on a spreadsheet, you won't be able to develop your reporting effectively.
Every deck of cards is loaded. You have to know how they want it loaded.

Resources