Skip to content

Commit a737a91

Browse files
baseTwoCopilot
andauthored
Update Cql/Cql.Invocation/Toolkit/Extensions/InvocationToolkitExtensions.FhirLibraryAdding.cs
Co-authored-by: Copilot <[email protected]>
1 parent 41dd736 commit a737a91

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

Cql/Cql.Invocation/Toolkit/Extensions/InvocationToolkitExtensions.FhirLibraryAdding.cs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,24 @@ IEnumerable<string> GetRelatedResources(FhirLibrary library)
245245

246246
// Regex to extract "Library", "NCQAAdvancedIllnessandFrailty", and optional "1.0.0" from resource string
247247
// Example: https://fire.ly/fhir/Library/NCQAAdvancedIllnessandFrailty|1.0.0
248-
// Groups: 1=resourceType, 2=libraryName, 3=version (optional)
248+
/// <summary>
249+
/// Regex to extract the resource type, library name, and optional version from a FHIR Library resource string.
250+
///
251+
/// Capture groups:
252+
/// 1. <b>resourceType</b>: The FHIR resource type (e.g., "Library").
253+
/// 2. <b>libraryName</b>: The name of the library (e.g., "NCQAAdvancedIllnessandFrailty").
254+
/// 3. <b>version</b> (optional): The version of the library (e.g., "1.0.0").
255+
///
256+
/// Examples of valid input strings and their capture groups:
257+
/// - <c>https://fire.ly/fhir/Library/NCQAAdvancedIllnessandFrailty|1.0.0</c>
258+
/// 1 = "Library", 2 = "NCQAAdvancedIllnessandFrailty", 3 = "1.0.0"
259+
/// - <c>/Library/SomeLibrary|2.3.4</c>
260+
/// 1 = "Library", 2 = "SomeLibrary", 3 = "2.3.4"
261+
/// - <c>/Library/AnotherLibrary</c>
262+
/// 1 = "Library", 2 = "AnotherLibrary", 3 = null
263+
/// - <c>https://example.com/fhir/Library/MyLib</c>
264+
/// 1 = "Library", 2 = "MyLib", 3 = null
265+
/// </summary>
249266
[GeneratedRegex(@"\/([A-Za-z]+)\/([^|\/]+)(?:\|([0-9A-Za-z\.\-\+]+))?$")]
250267
private static partial Regex FhirLibraryResourceRegex();
251268

0 commit comments

Comments
 (0)