Skip to content
Open
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,9 @@ internal fun String.toBigDecimalOrNull(): BigDecimal? =

/** FHIRPath variables are referenced with `%`, while lookup maps store the bare identifier. */
internal fun String.normalizedVariableName(): String = removePrefix("%")

private val questionnaireResponseResourceReferenceRegex =
Regex("""(?<![A-Za-z0-9_'])%resource(?![A-Za-z0-9_'])""")

internal fun String.referencesQuestionnaireResponseResource(): Boolean =
questionnaireResponseResourceReferenceRegex.containsMatchIn(this)
Loading
Loading