avniproject / JSSCP

0 stars 0 forks source link

Fix rule for uuid "15f86a07-dc0c-4b31-83d6-c04c44e4e5a7" #346

Closed Gojo-Taqi closed 3 weeks ago

Gojo-Taqi commented 3 months ago

In the Sickle cell lab test form, there is a concept called "Disease status". It calculates values based on the Hb provided.

BEULAHEVANJALIN commented 2 months ago
select rule_uuid,
       individual.first_name,
       individual.last_name,
       individual.uuid,
       encounter_type.name,
       catchment.name,
       form_element.name,
       error_message
from rule_failure_telemetry
         left join program_encounter on rule_failure_telemetry.entity_id = program_encounter.uuid
         left join encounter_type on program_encounter.encounter_type_id = encounter_type.id
         left join individual on rule_failure_telemetry.individual_uuid = individual.uuid
         left join users on program_encounter.filled_by_id = users.id
         left join catchment on users.catchment_id = catchment.id
         left join form_element on form_element.uuid = rule_failure_telemetry.source_id
where rule_uuid in (
                    '15f86a07-dc0c-4b31-83d6-c04c44e4e5a7',
                    '60c0fb96-39ab-4fbb-807e-8a44343d2870',
                    '62439ffa-4cbd-4b4d-a5b4-91522889d2bc',
                    '770f0d7c-c04a-4ce4-9e23-a5b4efbdb703',
                    '96a1938a-c0e2-4dd5-b563-03a2e7e57496',
                    'a69620ac-f9dc-4bb7-a700-3bf250e7fc23',
                    'e6221b19-c2f7-4841-8246-e861a37193d5'
    )
and is_closed is false;

UUIDs: |-| 15f86a07-dc0c-4b31-83d6-c04c44e4e5a7 60c0fb96-39ab-4fbb-807e-8a44343d2870 62439ffa-4cbd-4b4d-a5b4-91522889d2bc 770f0d7c-c04a-4ce4-9e23-a5b4efbdb703 96a1938a-c0e2-4dd5-b563-03a2e7e57496 a69620ac-f9dc-4bb7-a700-3bf250e7fc23 e6221b19-c2f7-4841-8246-e861a37193d5

BEULAHEVANJALIN commented 2 months ago

JSSCP UAT NEW.zip

JSSCP.zip

BEULAHEVANJALIN commented 2 months ago
select *
from rule_failure_telemetry
where rule_uuid in (
                    '15f86a07-dc0c-4b31-83d6-c04c44e4e5a7',
                    '60c0fb96-39ab-4fbb-807e-8a44343d2870',
                    '62439ffa-4cbd-4b4d-a5b4-91522889d2bc',
                    '770f0d7c-c04a-4ce4-9e23-a5b4efbdb703',
                    '96a1938a-c0e2-4dd5-b563-03a2e7e57496',
                    'a69620ac-f9dc-4bb7-a700-3bf250e7fc23',
                    'e6221b19-c2f7-4841-8246-e861a37193d5'
    )
  and is_closed is false
  and organisation_id = 42;

update rule_failure_telemetry
set is_closed        = true,
    closed_date_time = current_timestamp
where rule_uuid in (
                    '15f86a07-dc0c-4b31-83d6-c04c44e4e5a7',
                    '60c0fb96-39ab-4fbb-807e-8a44343d2870',
                    '62439ffa-4cbd-4b4d-a5b4-91522889d2bc',
                    '770f0d7c-c04a-4ce4-9e23-a5b4efbdb703',
                    '96a1938a-c0e2-4dd5-b563-03a2e7e57496',
                    'a69620ac-f9dc-4bb7-a700-3bf250e7fc23',
                    'e6221b19-c2f7-4841-8246-e861a37193d5'
    )
  and is_closed is false
  and organisation_id = 42;

Closed 194 open rule failures as part of this card.


BEULAHEVANJALIN commented 2 months ago

Uploaded the UAT bundle to prod on April 8th