Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7574981
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T16:34:19+00:00 2026-05-30T16:34:19+00:00

Am building Software for a clinic using VS2010 Pro. Among the requirements are: It

  • 0

Am building Software for a clinic using VS2010 Pro.
Among the requirements are:

  1. It should generate patient Number based on the date of enrollment.
  2. Middle two digits for Male patient is 11.

  3. Middle two digits for Female patient is 22

  4. The Final two digits range from 0 to 99.
    eg for Male patient enrolled today:2012-03-02.
    My Question is:
    What is the Maximum of patients that can be enrolled per day?

    here is part of my code:

    public string GetCurrentDate()
    {
        DateTime currentDate = DateTime.Now;
        string todaydate = currentDate.ToShortDateString().ToString();
        return todaydate;
    }
    
    
    public int RadomNum()
    {
        return _random.Next(00, 99);
    }
    
    
    public string GeneratePatientNumber(Gender gender)
    {
        return GetCurrentDate() + "-" + (int)gender + "-" + RadomNum();
    }
    
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T16:34:20+00:00Added an answer on May 30, 2026 at 4:34 pm

    Are you asking what the maximum number of patients you can register per day? If so then for each gender the only things varying are the last two digits so you have 100 possible patient codes per gender based on that pattern.

    That having been said a few things should be noted.

    Firstly your random number generation means that you may well hit on an already generated pateient number before you use all the available possibilities. Are random numbers needed to keep them non-sequential? If so then you should either do something like shuffle a list of the numbers 0 to 100 initially and then keep picking from that or if you are likely to use a small portion of them then you could get away with just checking for if the generated ID exists already.

    Also since RandomNum() is an int then you will probably want to make sure its padded to two digits before including it in your patient number.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have very little experience building software for Windows, and zero experience using the
I am building some software using Clojure as a backend, and I'd like to
While building Qt and Qt-based software on windows, it seems important to set MINGWDIR
I'm going to be building some ASP.Net MVC 2 software using Visual Studio 2010
I am writing and building my software for Mono using Delphi Prism. So, I
I'm building a cash management software using WPF for learning purposes, and I'm having
I'm building an installer that automatically selects which software to install based on the
In an older software project, sometimes we are experiencing problems building an InstallShield-based installer,
During the process of building software applications, you would start testing what you have
We're building some software for an in-house Kiosk. The software is a basic .net

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.