Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support capture groups in Pat-ID convert #92

Merged
merged 2 commits into from
Sep 4, 2024

Conversation

pcvolkmer
Copy link
Collaborator

This will convert Pat-ID by using capture groups:

  • Pattern G([0-9]{8}) will convert G12345678 to 12345678
  • Pattern G([0-9]{8}) will convert G123456789 to 12345678
  • Pattern G/([0-9]{4})-([0-9]{4}) will convert G/1234-5678 to 12345678

If pattern does not match, this will return Pat-ID as is:

  • Pattern ([0-9]{8}) will not convert G12345678 and return it without change.

More examples in UnitTests.

Without capture groups in RegExp, convertId(String) will keep its old behaviour.

@pcvolkmer pcvolkmer linked an issue Aug 30, 2024 that may be closed by this pull request
@pcvolkmer
Copy link
Collaborator Author

This also allows to run tests in random order

@pcvolkmer pcvolkmer marked this pull request as ready for review September 1, 2024 17:27
@chgl chgl merged commit 91edc17 into bzkf:master Sep 4, 2024
16 checks passed
miracum-bot pushed a commit that referenced this pull request Sep 4, 2024
## [2.2.0](v2.1.3...v2.2.0) (2024-09-04)

### Features

* support capture groups in Pat-ID convert ([#92](#92)) ([91edc17](91edc17))

### Bug Fixes

* check if Pat-ID is reasonable value ([#90](#90)) ([812d57c](812d57c))
* check if value matches ICD10GM pattern ([#98](#98)) ([99d60ad](99d60ad))
* date conversion for oBDS 3.x ([#78](#78)) ([32cd649](32cd649))
* **deps:** update all non-major dependencies ([3934356](3934356))
* return timespan of all partial radiations ([#80](#80)) ([c73a4fd](c73a4fd)), closes [#79](#79)

### CI/CD

* updated build workflow to create signed releases ([#82](#82)) ([346d157](346d157))

### Miscellaneous Chores

* **config:** dont release on refactor and only on deps chore ([#68](#68)) ([76e18ec](76e18ec))
* **deps:** update github-actions ([#81](#81)) ([b89f7fd](b89f7fd))

### Documentation

* added CONTRIBUTING and DEVELOPMENT md ([#100](#100)) ([ed52cef](ed52cef))
* added SECURITY.md ([343c5e3](343c5e3))
@miracum-bot
Copy link
Collaborator

🎉 This PR is included in version 2.2.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@pcvolkmer pcvolkmer deleted the capture_groups branch September 4, 2024 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support capture groups in Pat-ID convert
3 participants