Back to Home

Wrong Stage

Closed intakes showing in open inventory

Due to either a bug or a user potentially using multiple tabs, an audit that is closed is showing as open.

Steps:

  1. Use Script 1 to find the audits that are potentially in this state
  2. Once the audit has been identified, add a SAFE script to update the StageNo and InventoryNo to 10 for only that UniqueInstanceNo

Intake Appears to Be Stuck

Due to either a bug or a user potentially using multiple tabs, an audit is not showing for either Business Owner Review or QR ReCheck.

Steps:

  1. Use Script 2 to find the audits that are potentially in this state
  2. Double check the audit's activity in p11_AuditActivity using Script 3 to ensure that the audit was stuck in QR Recheck
  3. Once the audit has been identified, add a SAFE script to update the StageNo to 3 and InventoryNo to 7 for only that UniqueInstanceNo

Script 1

select UniqueInstanceNo, StageNo, InventoryNo, SequenceNo from smart.p11_intakeform with (nolock) where (stageno < 10 and InventoryNo = 10) or (stageno = 10 and InventoryNo < 10)

Script 2

select UniqueInstanceNo, StageNo, InventoryNo, SequenceNo from smart.p11_intakeform with (nolock) where stageno = 2 and inventoryno not in (2,3)
select UniqueInstanceNo, StageNo, InventoryNo, SequenceNo from smart.p11_intakeform with (nolock) where stageno = 3 and inventoryno not in (7)
select UniqueInstanceNo, StageNo, InventoryNo, SequenceNo from smart.p11_intakeform with (nolock) where stageno = 4 and inventoryno not in (4,5,6)
select UniqueInstanceNo, StageNo, InventoryNo, SequenceNo from smart.p11_intakeform with (nolock) where stageno not in (1,2) and inventoryno in (2,3)
select UniqueInstanceNo, StageNo, InventoryNo, SequenceNo from smart.p11_intakeform with (nolock) where stageno != 3 and inventoryno in (7)
select UniqueInstanceNo, StageNo, InventoryNo, SequenceNo from smart.p11_intakeform with (nolock) where stageno != 4 and inventoryno in (4,5,6)

-- Closed Audits
select UniqueInstanceNo, StageNo, InventoryNo, SequenceNo from smart.p11_intakeform with (nolock) where stageno = 10 and inventoryno not in (10,11,12,20)
select UniqueInstanceNo, StageNo, InventoryNo, SequenceNo from smart.p11_intakeform with (nolock) where stageno != 10 and inventoryno in (10,11,12,20)

Script 3

select b.LookupTitle as Response, a.* From smart.p11_AuditActivity a
inner join smart.p11_CodeList b on b.LookupCategory = 'Response' and b.LookupNo = a.ResponseNo
where UniqueAuditFieldNo in
(select UniqueAuditFieldNo from smart.p11_auditChecklist_Fieldlist where UniqueInstanceNo1 = 189853)
order by UniqueAuditFieldNo, DateEntered