-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update C_Prescription.class.php #7470
Conversation
WHen prescribing a drug , in the inhouse drop down menu, with this code modification one can see the ndc_number(which can record peice of one tablet during adding of a drug this can be done.) along with ndc_number, you will see the no of tablets available in stock and the expiry date. This can be valuable to the pharmacist as he/she can decide which lot to finish first etc. without this info many a times when we select a drug to prescribe, and when we click on save, it says not enough in stock. this code can be incorporated in the openemr. regards Robert
|
||
$tmp_output .= ' - Price of One Tab: ' . $row['ndc_number']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add price of one tablet.
|
||
$tmp_output .= ' - Price of One Tab: ' . $row['ndc_number']; | ||
$tmp_output .= ' - No left in stock: ' . $row['on_hand']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will display the no of tablets left in stock while prescribing.
|
||
$tmp_output .= ' - Price of One Tab: ' . $row['ndc_number']; | ||
$tmp_output .= ' - No left in stock: ' . $row['on_hand']; | ||
$tmp_output .= ' - Expiry Date: ' . $row['expiration']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Displays the expiry date of the drug u are going to prescribe.
// } | ||
$res = sqlStatement("SELECT d.name, d.ndc_number, d.form, d.size, " . | ||
"d.unit, d.route, d.substitute, t.drug_id, t.selector, t.dosage, " . | ||
"t.period, t.quantity, t.refills, d.drug_code, i.on_hand,i.expiration " . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated added join statement to include on_hand and expiration date.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed blank spaces, and corrected indentation.
Pl see if it is ok.
hi @xpindia22, check out these 2 errors you can also get going with the easy dev setup which has some neat features with the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The blank space has been removed the the indentation error corrected to the best of my knowledge.
Pl see if its ok :)
hi @stephenwaite , |
hi @stephenwaite , |
WHen prescribing a drug , in the inhouse drop down menu, with this code modification one can see the ndc_number(which can record peice of one tablet during adding of a drug this can be done.) along with ndc_number, you will see the no of tablets available in stock and the expiry date. This can be valuable to the pharmacist as he/she can decide which lot to finish first etc. without this info many a times when we select a drug to prescribe, and when we click on save, it says not enough in stock. this code can be incorporated in the openemr.
regards
Robert
Fixes #
Short description of what this resolves:
This adds a new feature to the drop down menu of drugs which are being prescribed. The user comes to know when the drug is going to expire. So if there are 2 lots of the same medication, the one dated to expire earlier can be finished first.
Secondly this shows no of tablets available in stock.
Right now without this modification, it allows u to select the drug , no of tablets etc but when u press ok, it gives an error that there are not enough medications in the stock.
thirdly
as advised by openemr ndc can be used to mention the price of medication, so same has been done.
these three modifications augment the functioning of the openemr.
Changes proposed in this pull request:
lines 61-75 of c_Prescription.class.php have been changed to
$res = sqlStatement("SELECT d.name, d.ndc_number, d.form, d.size, " .
"d.unit, d.route, d.substitute, t.drug_id, t.selector, t.dosage, " .
"t.period, t.quantity, t.refills, d.drug_code, i.on_hand " .
"FROM drug_templates AS t " .
"JOIN drugs AS d ON d.drug_id = t.drug_id " .
"JOIN drug_inventory AS i ON d.drug_id = i.drug_id " .
"ORDER BY t.selector");
====================================