feat: Add SurgicalBlockObsHandler with reusable dynamic URL token resolver#123
Open
vvkpd wants to merge 4 commits into
Open
feat: Add SurgicalBlockObsHandler with reusable dynamic URL token resolver#123vvkpd wants to merge 4 commits into
vvkpd wants to merge 4 commits into
Conversation
…pdown in operative report forms Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Split long URL string literals and replace manual date formatting
with moment(datetime).format('DD/MM/YYYY') to stay within the 100-char line limit.
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…SurgicalBlock obs handler Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
f198c58 to
9e9bc68
Compare
…stead of block uuid Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
binduak
approved these changes
Jun 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What This Introduces
Generic: Dynamic URL Token Resolver (
Util.resolveUrlTokens)A reusable utility method that resolves date tokens in any URL string at render time. Any form control that needs dynamic parameters in a configurable URL can use this.
Supported tokens:
{NOW}{NOW-Nd}{NOW-30d},{NOW-40d})How to Use in Any Form Control
The designer descriptor exposes
URLas a text field — the form builder configures the full URL including tokens:Specific:
SurgicalBlockObsHandlerUses the token resolver to implement a "Select Surgery" dropdown for operative report forms.
Data model: A
SurgicalBlockis a time slot with a provider. Each block can contain multiple surgeries (SurgicalAppointment). The saved value issurgicalAppointment.uuid— the unique identifier per surgery — not the block UUID.Default URL (used when
properties.URLis not configured):Configuring a different date window (e.g. 40 days) — edit the URL field in implementer-interface:
All URL params are configurable —
activeBlocks,includeVoided,v=customrepresentation, even the base endpoint path. Only the date values stay dynamic via tokens.Results are filtered client-side by
patientUuid(passed through the form rendering chain viaContainer → ObsControl) — only the current patient's surgeries appear in the dropdown.Test Plan
Select Surgeryconcept (Complex,SurgicalBlockObsHandler) to an operative report form via implementer-interface — verifyURLtext field appears in properties panel with token-based default{NOW-30d}to{NOW-40d}in the URL field, save and publish — verify API call uses 40-day windowsurgicalAppointment.uuid(not block UUID) on selectionSurgicalBlock.spec.js(10 tests),designer/SurgicalBlock.spec.js(5 tests),Util.spec.js(7 newresolveUrlTokenstests)🤖 Generated with Claude Code