feat: add cg snomed mapping to config search#1390
Conversation
🔒 Security Scan Results
|
| Severity | Total |
|---|---|
| 🟠 High | 12 |
| 🟡 Medium | 3 |
📦 refiner-app
✅ No vulnerabilities found
📦 refiner-lambda
| Severity | Count |
|---|---|
| 🟠 High | 4 |
📦 refiner-ops
| Severity | Count |
|---|---|
| 🟠 High | 8 |
| 🟡 Medium | 3 |
View detailed results: Security tab
Last updated: 2026-06-22 16:10:45 UTC
| threshold: 0.25, | ||
| distance: 500, // Broaden the distance so Fuse doesn't penalize long strings | ||
| includeMatches: true, | ||
| findAllMatches: true, |
There was a problem hiding this comment.
We might be able to avoid a lot of the string length related logic by setting minMatchCharLength to 3.
Let me know if I'm missing anything but this seems to be working for me.
There was a problem hiding this comment.
Doing it this way seems to make Fuse break when there are strings with spaces in them (note the resetting of the match results after spaces). I toyed around with a few settings to try to get it to work but couldn't seem to figure out how.
Screen.Recording.2026-06-22.at.10.17.45.AM.mov
Lmk if you can repro. It seems to work fine if we do the checking in React, so I might just leave it like that unless there's a setting you can find that makes it behave like we expect
There was a problem hiding this comment.
I'm seeing the same thing. I think we'd need to tweak the hook to account for a minimum string length which we don't need to do here, so let's leave it as you have it.
@jakewheeler setting the height here to Screen.Recording.2026-06-22.at.9.48.50.AM.movLmk if I misunderstood / you have another thought on how to set the max height. |
| conditions = await get_latest_conditions_db(db=db) | ||
| return [ | ||
| GetConditionsResponse( | ||
| id=condition.id, | ||
| display_name=condition.display_name, | ||
| ) | ||
| for condition in conditions | ||
| ] |
There was a problem hiding this comment.
Apologies if my wording about the response model was confusing. I meant to suggest that we actually go back to this model where we explicitly map what we get from the DB into a response object that only has the properties we intend to provide to the client.
The current change doesn't really buy us anything since we are directly passing what we receive from the DB directly to the client still. We just have one more wrapper involved now.
| }) | ||
| ).toBeVisible(); | ||
| await expect(page.getByRole('searchbox')).not.toBeVisible(); | ||
| const setupConfigurationButton = page.getByRole('button', { |

🔀 PULL REQUEST
💡 Summary
Adds SNOMED CG code / display name to the creation modal search / confirmation flow
Screen.Recording.2026-06-17.at.12.19.54.PM.mov
🔗 Related Issue
Fixes #840
✅ Acceptance Criteria
🧪 How to test
ℹ️ Additional Information