scanning v1
This commit is contained in:
24
LabWise/AIvsPubChem.md
Normal file
24
LabWise/AIvsPubChem.md
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
CAS locked in → PubChem lookup fires
|
||||||
|
↓
|
||||||
|
┌────────────┴────────────┐
|
||||||
|
PubChem has name? No name
|
||||||
|
↓ ↓
|
||||||
|
AI has name? keep AI name (if any)
|
||||||
|
┌───────┴───────┐ aiSatisfied = !aiName.isEmpty
|
||||||
|
Yes No
|
||||||
|
↓ ↓
|
||||||
|
arbitrate use PubChem name directly
|
||||||
|
↓ aiSatisfied = true
|
||||||
|
isSameCompound?
|
||||||
|
┌────┴────┐
|
||||||
|
Yes No
|
||||||
|
↓ ↓
|
||||||
|
labelIsCommonName? trust PubChem (CAS is reliable)
|
||||||
|
┌────┴────┐
|
||||||
|
Yes No
|
||||||
|
↓ ↓
|
||||||
|
use use
|
||||||
|
label PubChem
|
||||||
|
name name
|
||||||
|
("CHAPS")
|
||||||
|
aiSatisfied = true → no more AI re-triggers
|
||||||
@@ -108,6 +108,9 @@ struct InventoryView: View {
|
|||||||
}
|
}
|
||||||
case .scan:
|
case .scan:
|
||||||
ScanView()
|
ScanView()
|
||||||
|
.onDisappear {
|
||||||
|
Task { await viewModel.loadChemicals() }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.task {
|
.task {
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user