Skip to content

Commit

Permalink
fix: Service Request - filter patient as patient link can be changed …
Browse files Browse the repository at this point in the history
…from non-submitted encounters
  • Loading branch information
akashkrishna619 committed Dec 18, 2023
1 parent ca2c1e1 commit 5c55b9d
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,12 @@ def make_observation(service_request):
return name_ref_in_child[0], name_ref_in_child[1], "New"
else:
exist_sample_collection = frappe.db.exists(
"Sample Collection", {"reference_name": service_request.order_group}
"Sample Collection",
{
"reference_name": service_request.order_group,
"docstatus": 0,
"patient": service_request.patient,
},
)

if template.has_component:
Expand Down

0 comments on commit 5c55b9d

Please sign in to comment.