Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions hms_tz/nhif/nhif_api/price_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def process_nhif_records(company):
company=company,
facility_code=facility_code,
)
frappe.msgprint("Processing NHIF prices via backaground job", alert=True)
frappe.msgprint("Processing NHIF prices via background job", alert=True)

enqueue(
method=process_nhif_coverages,
Expand All @@ -66,7 +66,7 @@ def process_nhif_records(company):
company=company,
facility_code=facility_code,
)
frappe.msgprint("Processing NHIF Coverages via backaground job", alert=True)
frappe.msgprint("Processing NHIF Coverages via background job", alert=True)


@frappe.whitelist()
Expand All @@ -79,7 +79,7 @@ def enqueue_fetch_nhif_items(company):
is_async=True,
company=company,
)
frappe.msgprint("Fetch NHIF Items via backaground job", alert=True)
frappe.msgprint("Fetch NHIF Items via background job", alert=True)


def get_price_package(company):
Expand Down
13 changes: 8 additions & 5 deletions hms_tz/nhif/nhif_api/reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def enqueue_get_diseases(company):
is_async=True,
company=company,
)
frappe.msgprint("Fetch Diseases via backaground job", alert=True)
frappe.msgprint("Fetch Diseases via background job", alert=True)


@frappe.whitelist()
Expand Down Expand Up @@ -205,13 +205,16 @@ def update_medical_code(disease):
has_changed = True
mc_doc.definition = disease.get("DiseaseName")

if mc_doc.is_non_specific != disease.get("IsNonSpecific"):
if (
disease.get("IsNonSpecific") and
mc_doc.is_non_specific != disease.get("IsNonSpecific")
):
has_changed = True
mc_doc.is_non_specific = disease.get("IsNonSpecific")

if mc_doc.disabled == 1:
has_changed = True
mc_doc.disabled = 0
# if mc_doc.disabled == 1:
# has_changed = True
# mc_doc.disabled = 0

if has_changed:
mc_doc.save(ignore_permissions=True)
Expand Down