Skip to content

Instantly share code, notes, and snippets.

View disusered's full-sized avatar

Carlos Rosquillas disusered

View GitHub Profile
@disusered
disusered / patch.diff
Created November 17, 2023 22:24
Remove "Open Emails" from dashboard
diff --git a/apps/prx/graphs.py b/apps/prx/graphs.py
index 7e5b29b..8297d4f 100644
--- a/apps/prx/graphs.py
+++ b/apps/prx/graphs.py
@@ -736,10 +736,6 @@ def tracking_email(start_date, end_date, campaign='all'):
rxs_data = {'from_medics_ids': medics_ids_str, "only_count": True}
sent_rxs_data = {'from_medics_ids': medics_ids_str, "only_count": True, "field": ("sent", "=", True)}
- rxs_open_email_data = {
- 'from_medics_ids': medics_ids_str, "only_count": True,

Issues found interacting with new Rx endpoints

Can't fetch signature with certain fields missing

Only .patient.email is being validated. We need to validate other fields in the form, since not having these fields gives an error when fetching the signature with the minimal_rx query param. From my testing the following fields are required:

  • .patient.email
  • .medic.cedula_prof

Without these, the generated Rx give a 500 error when trying to fetch via patient landing's endpoint.