Skip to content

Commit

Permalink
fix: change 'invoiced' flag to 'billing_status' from get_prescribed q…
Browse files Browse the repository at this point in the history
…uery of Lab Test and Clinical Procedure
  • Loading branch information
aibelshajan authored and akashkrishna619 committed Mar 5, 2024
1 parent 209071e commit 43546a1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ let show_procedure_templates = function(frm, result){
frm.doc.service_request = $(this).attr('data-name');
frm.doc.practitioner = $(this).attr("data-practitioner");
frm.doc.invoiced = 0;
if ($(this).attr('data-invoiced') === 1) {
if ($(this).attr('data-invoiced') === "Invoiced") {
frm.doc.invoiced = 1;
}
frm.refresh_field("procedure_template");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ def get_procedure_prescribed(patient, encounter=False):
return (
frappe.qb.from_(hso)
.select(
hso.template_dn, hso.order_group, hso.invoiced, hso.practitioner, hso.order_date, hso.name
hso.template_dn, hso.order_group, hso.billing_status, hso.practitioner, hso.order_date, hso.name
)
.where(hso.patient == patient)
.where(hso.status != "completed-Request Status")
Expand Down
3 changes: 1 addition & 2 deletions healthcare/healthcare/doctype/lab_test/lab_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,13 +217,12 @@ var show_lab_tests = function (frm, lab_test_list) {
row.find("a").click(function () {
frm.doc.template = $(this).attr('data-lab-test');
frm.doc.service_request = $(this).attr('data-name');
console.log($(this).attr('data-name'))
frm.doc.practitioner = $(this).attr('data-practitioner');
frm.set_df_property('template', 'read_only', 1);
frm.set_df_property('patient', 'read_only', 1);
frm.set_df_property('practitioner', 'read_only', 1);
frm.doc.invoiced = 0;
if ($(this).attr('data-invoiced') === 1) {
if ($(this).attr('data-invoiced') === "Invoiced") {
frm.doc.invoiced = 1;
}
refresh_field('invoiced');
Expand Down
2 changes: 1 addition & 1 deletion healthcare/healthcare/doctype/lab_test/lab_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ def get_lab_test_prescribed(patient):
return (
frappe.qb.from_(hso)
.select(
hso.template_dn, hso.order_group, hso.invoiced, hso.practitioner, hso.order_date, hso.name
hso.template_dn, hso.order_group, hso.billing_status, hso.practitioner, hso.order_date, hso.name
)
.where(hso.patient == patient)
.where(hso.status != "completed-Request Status")
Expand Down

0 comments on commit 43546a1

Please sign in to comment.