#3014 multiple dose application naming#3379
Merged
rwmcintosh merged 2 commits intodevelopfrom Jan 22, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes the naming inconsistency in multiple dose applications when exporting to MoBi. Previously, application indices lacked uniform padding (e.g., "Application_1", "Application_10"), causing confusing sorting. The fix ensures indices are zero-padded to maintain consistent width (e.g., "Application_001", "Application_010").
Changes:
- Modified
addProtocolmethod to calculate and apply uniform zero-padding to application indices based on total count - Converted schema items enumeration to a list to enable count-based width calculation
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Greptile OverviewGreptile SummaryFixed multiple dose application naming to use zero-padded indices, ensuring proper lexicographic ordering when exported to MoBi.
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Client
participant EventBuildingBlockCreator
participant SchemaItemsMapper
participant ApplicationFactory
Client->>EventBuildingBlockCreator: addProtocol(compoundProperties)
EventBuildingBlockCreator->>SchemaItemsMapper: MapFrom(protocol)
SchemaItemsMapper-->>EventBuildingBlockCreator: IEnumerable<ISchemaItem>
Note over EventBuildingBlockCreator: Convert to List and calculate width<br/>width = schemaItems.Count.ToString().Length
loop For each schemaItem (with index)
Note over EventBuildingBlockCreator: Format number with padding<br/>number = (index+1).ToString($"D{width}")<br/>e.g., "001", "002", ..., "100"
EventBuildingBlockCreator->>EventBuildingBlockCreator: Create applicationName<br/>"Application_{number}"
EventBuildingBlockCreator->>ApplicationFactory: addApplication(eventGroup, schemaItem, applicationName)
ApplicationFactory-->>EventBuildingBlockCreator: Application created
end
EventBuildingBlockCreator-->>Client: Protocol added with zero-padded names
|
Yuri05
reviewed
Jan 22, 2026
Yuri05
approved these changes
Jan 22, 2026
Contributor
Author
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.
Fixes #3014
Description
When creating multiple dose application and exporting it to MoBi, the index in the naming does not have the same amount of numbers, leading to confusing order.
Type of change
Please mark relevant options with an
xin the brackets.How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Reviewer checklist
Mark everything that needs to be checked before merging the PR.
This change requires a documentation updateabove is selectedScreenshots (if appropriate):
Questions (if appropriate):