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 8641283
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T11:29:06+00:00 2026-06-12T11:29:06+00:00

I haven’t written any code yet because i don’t know where to start. I

  • 0

I haven’t written any code yet because i don’t know where to start.

I have a RX Prescription form that Doctor’s fill out to create a “New Prescription”. I need to write a check to make sure what they fill out is actually possible. There are 4 variables they fill out: Quantity, MG per Dose, Dosages per Day, Prescribed Date.

For example, I need to make sure that if a Doctor fills out a RX for: 10 total pills, 1MG per dose & 3 Dosages per day, that it will return an error. It would error because after 3 days the Patient would only have 1 Pill left (3 per day * 3 days = 9 total dosages).

I need to make sure that the prescription makes sense, and that whatever they fill out is mathematically possible. My guess is to write a PHP Loop, but the math is sadly very fuzzy to me. Any help is greatly appreciated. This is the final functionality for my project before it goes “Live”.

  • 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-06-12T11:29:07+00:00Added an answer on June 12, 2026 at 11:29 am

    Are you basically saying you want to find out if the total number of pills is wholly divisible by the number of days? Do you know the number of days the prescription is for? If so:

    if($totalNumberOfPills % $numberOfDays == 0) {
       // Sound.
    }
    

    Perhaps I am misunderstanding what you are asking.

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

Sidebar

Related Questions

Haven't seen anything, but I have seen that you can create albums in the
I haven't found any get equivalent to appendBytes. If I've understood getBytes correctly, that
Haven't seen many Geneva related questions yet, I have posted this question in the
Haven't found a solution to this problem yet, have tried some things... I have
Haven't seen this feature anywhere else. I know that the 32nd bit is used
I haven't found any solution, some people ask almost the same thing, but that
I haven't used ARC yet other than to deal with it when it forces
I haven't used multithreading in Clojure at all so am unsure where to start.
I haven't been able to get this working and all of the sample code
I haven't actually built an app yet, but I'm confused by documentation on bind-attr.

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.