From 99d60ad80111583b91e9696b13fd474ad46ad700 Mon Sep 17 00:00:00 2001 From: Paul-Christian Volkmer Date: Tue, 3 Sep 2024 10:47:08 +0200 Subject: [PATCH 01/10] fix: check if value matches ICD10GM pattern (#98) This will do a more concise value check and not only checks if value is null. [skip ci] --- .../mapper/ObdsConditionMapper.java | 2 +- .../obdstofhir/mapper/ObdsToFhirMapper.java | 4 ++++ .../mapper/ObdsToFhirMapperTests.java | 24 +++++++++++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsConditionMapper.java b/src/main/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsConditionMapper.java index 0ed0167a..3f284e75 100644 --- a/src/main/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsConditionMapper.java +++ b/src/main/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsConditionMapper.java @@ -67,7 +67,7 @@ public Bundle mapOnkoResourcesToCondition( // 'Tumorzuordung' // It's possible that 'Meldung.Diagnose' is set but 'Meldung.Diagnose.Primaertumor_*' is not, // in that case also use the TumorZuordnung to construct the Condition. - if (primDia == null || primDia.getPrimaertumor_ICD_Code() == null) { + if (primDia == null || !isIcd10GmCode(primDia.getPrimaertumor_ICD_Code())) { primDia = meldung.getTumorzuordnung(); if (primDia == null) { diff --git a/src/main/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsToFhirMapper.java b/src/main/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsToFhirMapper.java index a730939a..c5b8c5a0 100644 --- a/src/main/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsToFhirMapper.java +++ b/src/main/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsToFhirMapper.java @@ -223,4 +223,8 @@ public static DateTimeType convertObdsDateToDateTimeType(String obdsDate) { throw e; } } + + public static boolean isIcd10GmCode(String value) { + return null != value && value.matches("[A-Z][0-9]{2}(\\.[0-9]{1,2})?"); + } } diff --git a/src/test/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsToFhirMapperTests.java b/src/test/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsToFhirMapperTests.java index 0767d8d7..cfdeb72f 100644 --- a/src/test/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsToFhirMapperTests.java +++ b/src/test/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsToFhirMapperTests.java @@ -5,9 +5,12 @@ import java.time.DateTimeException; import java.util.Arrays; +import java.util.stream.Stream; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.CsvSource; +import org.junit.jupiter.params.provider.MethodSource; import org.miracum.streams.ume.obdstofhir.model.ADT_GEKID; import org.miracum.streams.ume.obdstofhir.model.Meldeanlass; import org.miracum.streams.ume.obdstofhir.model.MeldungExport; @@ -115,4 +118,25 @@ void convertPatientIdWithDefaultPattern(String input, String output) { var actual = ObdsToFhirMapper.convertId(input); assertThat(actual).isEqualTo(output); } + + @ParameterizedTest + @MethodSource("icd10GmCodeValidationData") + void checkValueToMatchIcd10Pattern(String input, boolean valid) { + var actual = ObdsToFhirMapper.isIcd10GmCode(input); + assertThat(actual).isEqualTo(valid); + } + + private static Stream icd10GmCodeValidationData() { + return Stream.of( + Arguments.of("C00.0", true), + Arguments.of("C37", true), + Arguments.of("C79.88", true), + Arguments.of("C88.20", true), + Arguments.of("C30.0", true), + Arguments.of("D00.0", true), + Arguments.of("D00.000", false), + Arguments.of("CC0.0", false), + Arguments.of("", false), + Arguments.of(null, false)); + } } From 91edc1718a47ddad9403514228a41a934a0136e1 Mon Sep 17 00:00:00 2001 From: Paul-Christian Volkmer Date: Wed, 4 Sep 2024 20:07:19 +0200 Subject: [PATCH 02/10] feat: support capture groups in Pat-ID convert (#92) Co-authored-by: chgl [skip ci] --- .../obdstofhir/mapper/ObdsToFhirMapper.java | 10 +++- .../mapper/ObdsToFhirIntegrationTest.java | 57 ++++++++++++++++--- 2 files changed, 58 insertions(+), 9 deletions(-) diff --git a/src/main/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsToFhirMapper.java b/src/main/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsToFhirMapper.java index c5b8c5a0..a888543e 100644 --- a/src/main/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsToFhirMapper.java +++ b/src/main/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsToFhirMapper.java @@ -76,7 +76,15 @@ protected String computeResourceIdFromIdentifier(Identifier identifier) { protected static String convertId(String id) { Matcher matcher = ObdsToFhirMapper.localPatientIdPattern.matcher(id); if (matcher.find()) { - return matcher.group(); + if (matcher.groupCount() == 0) { + return matcher.group(); + } + var resultBuilder = new StringBuilder(); + for (int i = 1; i <= matcher.groupCount(); i++) { + var x = matcher.group(i); + resultBuilder.append(x); + } + return resultBuilder.toString(); } else { log.warn("Identifier to convert does not match pattern: {}", matcher.pattern().toString()); return id; diff --git a/src/test/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsToFhirIntegrationTest.java b/src/test/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsToFhirIntegrationTest.java index d4ef821b..0ec81312 100644 --- a/src/test/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsToFhirIntegrationTest.java +++ b/src/test/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsToFhirIntegrationTest.java @@ -2,6 +2,7 @@ import static org.assertj.core.api.Assertions.assertThat; +import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.ParameterizedTest; @@ -19,7 +20,30 @@ @MockBean(FhirProperties.class) public class ObdsToFhirIntegrationTest { - @Autowired ObdsTestMapper mapper; + ObdsTestMapper mapper; + + @BeforeEach + void setUp(@Autowired ObdsTestMapper mapper) { + this.mapper = mapper; + } + + @Nested + @TestPropertySource(properties = {""}) + class UseDefaultPatternWithoutConfig { + + @ParameterizedTest + @CsvSource({ + "12345,12345", + "123456789,123456789", + "1234567890,123456789", // Max 9 digits, remove last digit '0' + "1234567891,123456789", // Max 9 digits, remove last digit '1' + "0000012345,0000012345", // Not mathching pattern - keep as is + }) + void applyDefaultPattern(String input, String output) { + var actual = ObdsToFhirMapper.convertId(input); + assertThat(actual).isEqualTo(output); + } + } @Nested @TestPropertySource(properties = {"app.patient-id-pattern=\\\\w*"}) @@ -40,17 +64,34 @@ void applyLocalPatientIdPattern(String input, String output) { } @Nested - class UseDefaultPatternWithoutConfig { + @TestPropertySource(properties = {"app.patient-id-pattern=G([0-9]{8})"}) + class UsePatternWithCaptureGroups { @ParameterizedTest @CsvSource({ - "12345,12345", - "123456789,123456789", - "1234567890,123456789", // Max 9 digits, remove last digit '0' - "1234567891,123456789", // Max 9 digits, remove last digit '1' - "0000012345,0000012345", // Not mathching pattern - keep as is + "12345,12345", // not matching, return as is ... + // else return first complete group of 8 numbers found in input after "G" + "G1234567890,12345678", + "G12345678,12345678", }) - void applyDefaultPattern(String input, String output) { + void applyPatientIdPattern(String input, String output) { + var actual = ObdsToFhirMapper.convertId(input); + assertThat(actual).isEqualTo(output); + } + } + + @Nested + @TestPropertySource(properties = {"app.patient-id-pattern=G/([0-9]{4})-([0-9]{4})"}) + class UsePatternWithMultipleCaptureGroups { + + @ParameterizedTest + @CsvSource({ + "12345,12345", // not matching, return as is ... + // else return complete groups of 4 numbers found in input after "G/" and seperated by "-" + "G/1234-56789,12345678", + "G/1234-5678,12345678", + }) + void applyPatientIdPattern(String input, String output) { var actual = ObdsToFhirMapper.convertId(input); assertThat(actual).isEqualTo(output); } From ed52cefc9d896f0a1cc554d37c8f135b9b1304aa Mon Sep 17 00:00:00 2001 From: chgl Date: Wed, 4 Sep 2024 20:25:31 +0200 Subject: [PATCH 03/10] docs: added CONTRIBUTING and DEVELOPMENT md (#100) * docs: added CONTRIBUTING and DEVELOPMENT md * docs: updated based on reviewer feedback --- CONTRIBUTING.md | 44 +++++++++++++++++ DEVELOPMENT.md | 123 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 167 insertions(+) create mode 100644 CONTRIBUTING.md create mode 100644 DEVELOPMENT.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..b82056fe --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,44 @@ +# Contributing + +## License + +By contributing, you agree that your contributions will be licensed under the [GNU General Public License Version 3.0 (GPL-3.0 license)](LICENSE). + +## Contribution process + +This is the process we suggest for contributions. This process is designed to reduce the burden on project reviewers, +impact on other contributors, and to keep the amount of rework from the contributor to a minimum. + +1. Start a discussion by creating a GitHub issue, or asking on Slack (unless the change is trivial, for example a spelling fix in the documentation). + + 1. This step helps you identify possible collaborators and reviewers. + 1. Does the change align with technical vision and project values? + 1. Will the change conflict with another change in progress? If so, work with others to minimize impact. + 1. Is this change large? If so, work with others to break into smaller steps. + +1. Implement the change + + 1. Create or update your own fork of the repository. + 1. If the change is large, post a draft GitHub pull request. + 1. Include tests and documentation as necessary. + 1. Follow the commit message guidelines and other suggestions from the [development guidelines](DEVELOPMENT.md). + +1. Create a GitHub pull request (PR). + + 1. If you already have a draft PR, change it to ready for review. + 1. Refer to the GitHub documentation for more details about collaborating with PRs. + 1. Make sure the pull request passes the tests in CI. + 1. Code reviewers are automatically assigned. + +1. Review is performed by one or more reviewers. + + 1. This normally happens within a few days, but may take longer if the change is large, complex, or if a critical reviewer is unavailable. (feel free to ping the reviewer or team on the pull request). + +1. Address concerns and update the pull request. + + 1. Comments are addressed to each individual commit in the pull request, and changes should be addressed in a new fixup! commit placed after each commit. This is to make it easier for the reviewer to see what was updated. + 1. After pushing the changes, add a comment to the pull-request, mentioning the reviewers by name, stating that the review comments have been addressed. This is the only way that a reviewer is notified that you are ready for the code to be reviewed again. + +1. Maintainer merges the pull request after final changes are accepted. + +1. Merging your improvements will usually trigger a new release once merged diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md new file mode 100644 index 00000000..894c2c7c --- /dev/null +++ b/DEVELOPMENT.md @@ -0,0 +1,123 @@ +# Development + +Inspired by . + +## Commits and pull requests + +### Format Git commit messages + +We format commit messages to adhere to the [conventional commit standard](https://www.conventionalcommits.org/en/v1.0.0/). +The commit messages are also used to automatically create and version releases using [semantic-release](https://semantic-release.gitbook.io/semantic-release). + +### Git merge strategy + +Pull requests are usually merged into `master` using the [`rebase and merge`](https://docs.github.com/en/github/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/about-pull-request-merges#rebase-and-merge-your-pull-request-commits) strategy. + +A typical pull request should strive to contain a single logical change (but not +necessarily a single commit). Unrelated changes should generally be extracted +into their own PRs. + +If a pull request contains a stack of more than one commit, then +popping any number of commits from the top of the stack, should not +break the PR, ie. every commit should build and pass all tests. + +Commit messages and history are important as well, because they are +used by other developers to keep track of the motivation behind +changes. Keep logical diffs grouped together in separate commits and +order commits in a way that explains by itself the evolution of the +change. Rewriting and reordering commits is a natural part of the +review process. Mechanical changes like refactoring, renaming, removing +duplication, extracting helper methods, static imports should be kept +separated from logical and functional changes like adding a new feature +or modifying code behaviour. This makes reviewing the code much easier +and reduces the chance of introducing unintended changes in behavior. + +Whenever in doubt on splitting a change into a separate commit, ask +yourself the following question: if all other work in the PR needs to +be reverted after merging to master for some objective reason (eg. a +bug has been discovered), is it worth keeping that commit still in +master. + +## Code Style + +We recommend you use IntelliJ as your IDE. The code style used is the [Google Java style](https://google.github.io/styleguide/javaguide.html). +It is automatically enforced using [spotless](https://github.com/diffplug/spotless). + +To run spotless and other checks before opening a PR: `./gradlew :check` + +In addition to those you should also adhere to the following: + +### Readability + +The purpose of code style rules is to maintain code readability and developer +efficiency when working with the code. All the code style rules explained below +are good guidelines to follow but there may be exceptional situations where we +purposefully depart from them. When readability and code style rule are at odds, +the readability is more important. + +### Consistency + +Keep code consistent with surrounding code where possible. + +### Alphabetize + +Alphabetize sections in the documentation source files (both in the table of +contents files and other regular documentation files). + +### Use streams + +When appropriate, use the stream API. However, note that the stream +implementation does not perform well so avoid using it in inner loops or +otherwise performance sensitive sections. + +### Prefer String formatting + +Consider using String formatting (printf style formatting using the Java +`Formatter` class): `format("Session property %s is invalid: %s", name, value)` +(note that `format()` should always be statically imported). Sometimes, if you +only need to append something, consider using the `+` operator. Please avoid +`format()` or concatenation in performance critical sections of code. + +### Avoid ternary operator + +Avoid using the ternary operator except for trivial expressions. + +### Define class API for private inner classes too + +It is suggested to declare members in private inner classes as public if they +are part of the class API. + +### Use AssertJ + +Prefer AssertJ for complex assertions. + +### Maintain production quality for test code + +Maintain the same quality for production and test code. + +### Avoid abbreviations + +Please avoid abbreviations, slang or inside jokes as this makes harder for +non-native english speaker to understand the code. Very well known +abbreviations like `max` or `min` and ones already very commonly used across +the code base like `ttl` are allowed and encouraged. + +### Avoid default clause in exhaustive enum-based switch statements + +Avoid using the `default` clause when the switch statement is meant to cover all +the enum values. Handling the unknown option case after the switch statement +allows static code analysis tools (e.g. Error Prone's `MissingCasesInEnumSwitch` +check) report a problem when the enum definition is updated but the code using +it is not. + +### Use constructor injection + +Prefer [constructor-based dependency injection](https://docs.spring.io/spring-framework/reference/core/beans/dependencies/factory-collaborators.html#beans-constructor-injection) +over field or setter injection. + +## Releases + +The project aims for frequent releases. We achieve this using semantic-release, where +each merged PR can create a new release. This allows users of the application to quickly +receive bug fixes without waiting for arbitrary release cycles. This only works if the +quality of the code and especially the tests is up-to-par. From 819e0e55133d665a4b549ca921b90326ca012bd9 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Wed, 4 Sep 2024 18:30:09 +0000 Subject: [PATCH 04/10] chore(release): 2.2.0 [skip ci] ## [2.2.0](https://github.com/bzkf/obds-to-fhir/compare/v2.1.3...v2.2.0) (2024-09-04) ### Features * support capture groups in Pat-ID convert ([#92](https://github.com/bzkf/obds-to-fhir/issues/92)) ([91edc17](https://github.com/bzkf/obds-to-fhir/commit/91edc1718a47ddad9403514228a41a934a0136e1)) ### Bug Fixes * check if Pat-ID is reasonable value ([#90](https://github.com/bzkf/obds-to-fhir/issues/90)) ([812d57c](https://github.com/bzkf/obds-to-fhir/commit/812d57c3fc9bf0371680e19e93b639f14fd9e5cd)) * check if value matches ICD10GM pattern ([#98](https://github.com/bzkf/obds-to-fhir/issues/98)) ([99d60ad](https://github.com/bzkf/obds-to-fhir/commit/99d60ad80111583b91e9696b13fd474ad46ad700)) * date conversion for oBDS 3.x ([#78](https://github.com/bzkf/obds-to-fhir/issues/78)) ([32cd649](https://github.com/bzkf/obds-to-fhir/commit/32cd649ca82e5c9ac45ffbed821f0ebc58d64e71)) * **deps:** update all non-major dependencies ([3934356](https://github.com/bzkf/obds-to-fhir/commit/39343562efc7c51955a80823fb7a7aa727064af0)) * return timespan of all partial radiations ([#80](https://github.com/bzkf/obds-to-fhir/issues/80)) ([c73a4fd](https://github.com/bzkf/obds-to-fhir/commit/c73a4fd0f8e2f16e96f038775c9e26b7ec773813)), closes [#79](https://github.com/bzkf/obds-to-fhir/issues/79) ### CI/CD * updated build workflow to create signed releases ([#82](https://github.com/bzkf/obds-to-fhir/issues/82)) ([346d157](https://github.com/bzkf/obds-to-fhir/commit/346d1579f02106907f9d86f63dd9f1885621431b)) ### Miscellaneous Chores * **config:** dont release on refactor and only on deps chore ([#68](https://github.com/bzkf/obds-to-fhir/issues/68)) ([76e18ec](https://github.com/bzkf/obds-to-fhir/commit/76e18ec021b94485569241c22e6d1f8e67de7ad2)) * **deps:** update github-actions ([#81](https://github.com/bzkf/obds-to-fhir/issues/81)) ([b89f7fd](https://github.com/bzkf/obds-to-fhir/commit/b89f7fd11f1212ce5e39ff4342d18fd74e71ec6a)) ### Documentation * added CONTRIBUTING and DEVELOPMENT md ([#100](https://github.com/bzkf/obds-to-fhir/issues/100)) ([ed52cef](https://github.com/bzkf/obds-to-fhir/commit/ed52cefc9d896f0a1cc554d37c8f135b9b1304aa)) * added SECURITY.md ([343c5e3](https://github.com/bzkf/obds-to-fhir/commit/343c5e386b975c7f6a1a582d194b8f41eeb8934e)) --- build.gradle | 2 +- src/main/resources/application.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index ba79c953..1a76fd86 100644 --- a/build.gradle +++ b/build.gradle @@ -8,7 +8,7 @@ plugins { } group = 'org.miracum.streams.ume' -version = '2.1.3' +version = '2.2.0' sourceCompatibility = '21' targetCompatibility = '21' diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 205de856..e030651b 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -1,5 +1,5 @@ app: - version: 2.1.3 + version: 2.2.0 enableCheckDigitConv: ${CHECK_DIGIT_CONVERSION:false} patient-id-pattern: "[^0]\\d{8}" From abba11e052c05bc626b3fe99974a33ba7d037f47 Mon Sep 17 00:00:00 2001 From: Paul-Christian Volkmer Date: Sun, 15 Sep 2024 17:11:48 +0200 Subject: [PATCH 05/10] refactor: extract body site coding (#107) [skip ci] --- .../mapper/ObdsConditionMapper.java | 66 ++++++++++--------- 1 file changed, 35 insertions(+), 31 deletions(-) diff --git a/src/main/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsConditionMapper.java b/src/main/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsConditionMapper.java index 3f284e75..c5ab6e4a 100644 --- a/src/main/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsConditionMapper.java +++ b/src/main/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsConditionMapper.java @@ -120,39 +120,9 @@ public Bundle mapOnkoResourcesToCondition( var conditionCode = new CodeableConcept().addCoding(coding); onkoCondition.setCode(conditionCode); - var bodySiteADTCoding = new Coding(); - var bodySiteSNOMEDCoding = new Coding(); - var adtBodySite = primDia.getSeitenlokalisation(); - if (adtBodySite != null) { - var adtSeitenlokalisationDisplay = - DisplayAdtSeitenlokalisationLookup.lookupDisplay(adtBodySite); - var snomedCtSeitenlokalisationCode = SnomedCtSeitenlokalisationLookup.lookupCode(adtBodySite); - var snomedCtSeitenlokalisationDisplay = - SnomedCtSeitenlokalisationLookup.lookupDisplay(adtBodySite); - - if (adtSeitenlokalisationDisplay != null) { - bodySiteADTCoding - .setSystem(fhirProperties.getSystems().getAdtSeitenlokalisation()) - .setCode(adtBodySite) - .setDisplay(adtSeitenlokalisationDisplay); - } else { - LOG.warn("Unmappable body site in oBDS data: {}", adtBodySite); - } - - if (snomedCtSeitenlokalisationDisplay != null) { - bodySiteSNOMEDCoding - .setSystem(fhirProperties.getSystems().getSnomed()) - .setCode(snomedCtSeitenlokalisationCode) - .setDisplay(snomedCtSeitenlokalisationDisplay); - } else { - LOG.warn("Unmappable snomed body site in oBDS data: {}", adtBodySite); - } - - var bodySiteConcept = new CodeableConcept(); - bodySiteConcept.addCoding(bodySiteADTCoding).addCoding(bodySiteSNOMEDCoding); - onkoCondition.addBodySite(bodySiteConcept); + onkoCondition.addBodySite(getBodySiteConcept(adtBodySite)); } onkoCondition.setSubject( @@ -229,4 +199,38 @@ public Bundle mapOnkoResourcesToCondition( return bundle; } + + private CodeableConcept getBodySiteConcept(String adtBodySite) { + var bodySiteADTCoding = new Coding(); + var bodySiteSNOMEDCoding = new Coding(); + + var adtSeitenlokalisationDisplay = + DisplayAdtSeitenlokalisationLookup.lookupDisplay(adtBodySite); + var snomedCtSeitenlokalisationCode = SnomedCtSeitenlokalisationLookup.lookupCode(adtBodySite); + var snomedCtSeitenlokalisationDisplay = + SnomedCtSeitenlokalisationLookup.lookupDisplay(adtBodySite); + + if (adtSeitenlokalisationDisplay != null) { + bodySiteADTCoding + .setSystem(fhirProperties.getSystems().getAdtSeitenlokalisation()) + .setCode(adtBodySite) + .setDisplay(adtSeitenlokalisationDisplay); + } else { + LOG.warn("Unmappable body site in oBDS data: {}", adtBodySite); + } + + if (snomedCtSeitenlokalisationDisplay != null) { + bodySiteSNOMEDCoding + .setSystem(fhirProperties.getSystems().getSnomed()) + .setCode(snomedCtSeitenlokalisationCode) + .setDisplay(snomedCtSeitenlokalisationDisplay); + } else { + LOG.warn("Unmappable snomed body site in oBDS data: {}", adtBodySite); + } + + var bodySiteConcept = new CodeableConcept(); + bodySiteConcept.addCoding(bodySiteADTCoding).addCoding(bodySiteSNOMEDCoding); + + return bodySiteConcept; + } } From 5e85d93f962d0dccc5f1e6b3f8955fc5ffd7a0e0 Mon Sep 17 00:00:00 2001 From: Paul-Christian Volkmer Date: Sun, 15 Sep 2024 17:21:17 +0200 Subject: [PATCH 06/10] refactor: extract deceased and address value mapping (#106) Co-authored-by: chgl [skip ci] --- .../obdstofhir/mapper/ObdsPatientMapper.java | 134 +++++++++--------- 1 file changed, 67 insertions(+), 67 deletions(-) diff --git a/src/main/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsPatientMapper.java b/src/main/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsPatientMapper.java index 9f1dd434..fe8ddc2c 100644 --- a/src/main/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsPatientMapper.java +++ b/src/main/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsPatientMapper.java @@ -6,6 +6,7 @@ import java.util.*; import org.hl7.fhir.r4.model.*; import org.miracum.streams.ume.obdstofhir.FhirProperties; +import org.miracum.streams.ume.obdstofhir.model.ADT_GEKID.Menge_Patient.Patient.Patienten_Stammdaten.Menge_Adresse.Adresse; import org.miracum.streams.ume.obdstofhir.model.Meldeanlass; import org.miracum.streams.ume.obdstofhir.model.MeldungExport; import org.slf4j.Logger; @@ -108,76 +109,13 @@ public Bundle mapOnkoResourcesToPatient(List meldungExportList) { // deceased if (!deathReports.isEmpty()) { - // start by setting deceased to true. If a more detailed death date is - // available in the data, override it further down this code path. - patient.setDeceased(new BooleanType(true)); - - // get the first entry with the largest version number where the death date is set - var reportWithSterbeDatum = - deathReports.stream() - .sorted(Comparator.comparingInt(MeldungExport::getVersionsnummer).reversed()) - .filter( - m -> { - var mengeVerlauf = - m.getXml_daten() - .getMenge_Patient() - .getPatient() - .getMenge_Meldung() - .getMeldung() - .getMenge_Verlauf(); - - if (mengeVerlauf == null) { - return false; - } - - if (mengeVerlauf.getVerlauf() == null) { - return false; - } - - if (mengeVerlauf.getVerlauf().getTod() == null) { - return false; - } - - return StringUtils.hasLength( - mengeVerlauf.getVerlauf().getTod().getSterbedatum()); - }) - .findFirst(); - - if (reportWithSterbeDatum.isPresent()) { - var deathDate = - reportWithSterbeDatum - .get() - .getXml_daten() - .getMenge_Patient() - .getPatient() - .getMenge_Meldung() - .getMeldung() - .getMenge_Verlauf() - .getVerlauf() - .getTod() - .getSterbedatum(); - - patient.setDeceased(convertObdsDateToDateTimeType(deathDate)); - } else { - LOG.warn("Sterbedatum not set on any of the Tod Meldungen."); - } + patient.setDeceased(getDeceased(deathReports)); } // address - var patAddess = patData.getMenge_Adresse().getAdresse().getFirst(); - if (StringUtils.hasLength(patAddess.getPatienten_PLZ())) { - var address = new Address(); - address.setPostalCode(patAddess.getPatienten_PLZ()).setType(Address.AddressType.BOTH); - if (patAddess.getPatienten_Land() != null - && patAddess.getPatienten_Land().matches("[a-zA-Z]{2,3}")) { - address.setCountry(patAddess.getPatienten_Land().toUpperCase()); - } else { - address - .addExtension() - .setUrl(fhirProperties.getExtensions().getDataAbsentReason()) - .setValue(new CodeType("unknown")); - } - patient.addAddress(address); + var patAddress = patData.getMenge_Adresse().getAdresse().getFirst(); + if (StringUtils.hasLength(patAddress.getPatienten_PLZ())) { + patient.addAddress(getAddress(patAddress)); } var bundle = new Bundle(); @@ -197,4 +135,66 @@ private static String getBirthDateYearMonthString(String gebdatum) { return YearMonth.of(localBirthDate.getYear(), quarterMonth).toString(); } + + private Type getDeceased(List deathReports) { + // get the first entry with the largest version number where the death date is set + var reportWithSterbeDatum = + deathReports.stream() + .sorted(Comparator.comparingInt(MeldungExport::getVersionsnummer).reversed()) + .filter( + m -> { + var mengeVerlauf = + m.getXml_daten() + .getMenge_Patient() + .getPatient() + .getMenge_Meldung() + .getMeldung() + .getMenge_Verlauf(); + + try { + return StringUtils.hasLength( + mengeVerlauf.getVerlauf().getTod().getSterbedatum()); + } catch (NullPointerException e) { + return false; + } + }) + .findFirst(); + + if (reportWithSterbeDatum.isPresent()) { + var deathDate = + reportWithSterbeDatum + .get() + .getXml_daten() + .getMenge_Patient() + .getPatient() + .getMenge_Meldung() + .getMeldung() + .getMenge_Verlauf() + .getVerlauf() + .getTod() + .getSterbedatum(); + + return convertObdsDateToDateTimeType(deathDate); + } else { + LOG.warn("Sterbedatum not set on any of the Tod Meldungen."); + } + + // If a more detailed death date is not available in the data, return true. + return new BooleanType(true); + } + + private Address getAddress(Adresse patAddress) { + var address = new Address(); + address.setPostalCode(patAddress.getPatienten_PLZ()).setType(Address.AddressType.BOTH); + if (patAddress.getPatienten_Land() != null + && patAddress.getPatienten_Land().matches("[a-zA-Z]{2,3}")) { + address.setCountry(patAddress.getPatienten_Land().toUpperCase()); + } else { + address + .addExtension() + .setUrl(fhirProperties.getExtensions().getDataAbsentReason()) + .setValue(new CodeType("unknown")); + } + return address; + } } From 05e069de2807f2bdbf547628da1964573f3bd047 Mon Sep 17 00:00:00 2001 From: Paul-Christian Volkmer Date: Sun, 15 Sep 2024 18:04:04 +0200 Subject: [PATCH 07/10] refactor: extract method to generate converted pat ID (#103) Co-authored-by: chgl [skip ci] --- .../mapper/ObdsConditionMapper.java | 9 +-- .../mapper/ObdsMedicationStatementMapper.java | 6 +- .../mapper/ObdsObservationMapper.java | 5 +- .../obdstofhir/mapper/ObdsPatientMapper.java | 6 +- .../mapper/ObdsProcedureMapper.java | 6 +- .../obdstofhir/mapper/ObdsToFhirMapper.java | 14 +++++ .../mapper/ObdsToFhirIntegrationTest.java | 58 +++++++++++++++++++ 7 files changed, 78 insertions(+), 26 deletions(-) diff --git a/src/main/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsConditionMapper.java b/src/main/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsConditionMapper.java index c5ab6e4a..0dd0ad72 100644 --- a/src/main/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsConditionMapper.java +++ b/src/main/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsConditionMapper.java @@ -75,13 +75,8 @@ public Bundle mapOnkoResourcesToCondition( } } - var patId = getPatIdFromMeldung(meldungExport); - var pid = patId; - if (checkDigitConversion) { - pid = convertId(patId); - } - - var conIdentifier = pid + "condition" + primDia.getTumor_ID(); + final var pid = getConvertedPatIdFromMeldung(meldungExport); + final var conIdentifier = pid + "condition" + primDia.getTumor_ID(); onkoCondition.setId(this.getHash(ResourceType.Condition, conIdentifier)); diff --git a/src/main/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsMedicationStatementMapper.java b/src/main/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsMedicationStatementMapper.java index ffa05536..aba9ef67 100644 --- a/src/main/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsMedicationStatementMapper.java +++ b/src/main/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsMedicationStatementMapper.java @@ -57,11 +57,7 @@ public Bundle mapOnkoResourcesToMedicationStatement(List meldungE var senderId = meldungExport.getXml_daten().getAbsender().getAbsender_ID(); var softwareId = meldungExport.getXml_daten().getAbsender().getSoftware_ID(); - var patId = getPatIdFromMeldung(meldungExport); - var pid = patId; - if (checkDigitConversion) { - pid = convertId(patId); - } + final var pid = getConvertedPatIdFromMeldung(meldungExport); if (meldung != null && meldung.getMenge_SYST() != null diff --git a/src/main/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsObservationMapper.java b/src/main/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsObservationMapper.java index efc250cd..4ec97ae8 100644 --- a/src/main/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsObservationMapper.java +++ b/src/main/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsObservationMapper.java @@ -110,10 +110,7 @@ public Bundle mapOnkoResourcesToObservation(List meldungExportLis // reporting reason var meldeanlass = meldung.getMeldeanlass(); - patId = getPatIdFromMeldung(meldungExport); - if (checkDigitConversion) { - patId = convertId(patId); - } + patId = getConvertedPatIdFromMeldung(meldungExport); var senderId = meldungExport.getXml_daten().getAbsender().getAbsender_ID(); var softwareId = meldungExport.getXml_daten().getAbsender().getSoftware_ID(); diff --git a/src/main/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsPatientMapper.java b/src/main/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsPatientMapper.java index fe8ddc2c..550200a3 100644 --- a/src/main/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsPatientMapper.java +++ b/src/main/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsPatientMapper.java @@ -49,11 +49,7 @@ public Bundle mapOnkoResourcesToPatient(List meldungExportList) { var patient = new Patient(); // id - var patId = getPatIdFromMeldung(meldungExport); - var pid = patId; - if (checkDigitConversion) { - pid = convertId(patId); - } + final var pid = getConvertedPatIdFromMeldung(meldungExport); var id = this.getHash(ResourceType.Patient, pid); patient.setId(id); diff --git a/src/main/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsProcedureMapper.java b/src/main/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsProcedureMapper.java index d8053b33..657a435c 100644 --- a/src/main/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsProcedureMapper.java +++ b/src/main/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsProcedureMapper.java @@ -55,11 +55,7 @@ public Bundle mapOnkoResourcesToProcedure(List meldungExportList) var senderId = meldungExport.getXml_daten().getAbsender().getAbsender_ID(); var softwareId = meldungExport.getXml_daten().getAbsender().getSoftware_ID(); - var patId = getPatIdFromMeldung(meldungExport); - var pid = patId; - if (checkDigitConversion) { - pid = convertId(patId); - } + final var pid = getConvertedPatIdFromMeldung(meldungExport); var reportingReason = getReportingReasonFromAdt(meldungExport); diff --git a/src/main/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsToFhirMapper.java b/src/main/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsToFhirMapper.java index a888543e..f32f869e 100644 --- a/src/main/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsToFhirMapper.java +++ b/src/main/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsToFhirMapper.java @@ -23,6 +23,7 @@ public abstract class ObdsToFhirMapper { protected final FhirProperties fhirProperties; + static boolean checkDigitConversion; static Pattern localPatientIdPattern = Pattern.compile("[^0]\\d{8}"); private static final Logger log = LoggerFactory.getLogger(ObdsToFhirMapper.class); @@ -37,6 +38,11 @@ void setStringPattern(String value) { } } + @Value("${app.enableCheckDigitConv:false}") + void setCheckDigitConversion(boolean checkDigitConversion) { + ObdsToFhirMapper.checkDigitConversion = checkDigitConversion; + } + protected ObdsToFhirMapper(final FhirProperties fhirProperties) { this.fhirProperties = fhirProperties; } @@ -73,6 +79,14 @@ protected String computeResourceIdFromIdentifier(Identifier identifier) { .toString(); } + protected static String getConvertedPatIdFromMeldung(MeldungExport meldung) { + var patId = getPatIdFromMeldung(meldung); + if (checkDigitConversion) { + return convertId(patId); + } + return patId; + } + protected static String convertId(String id) { Matcher matcher = ObdsToFhirMapper.localPatientIdPattern.matcher(id); if (matcher.find()) { diff --git a/src/test/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsToFhirIntegrationTest.java b/src/test/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsToFhirIntegrationTest.java index 0ec81312..22794052 100644 --- a/src/test/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsToFhirIntegrationTest.java +++ b/src/test/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsToFhirIntegrationTest.java @@ -8,6 +8,8 @@ import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.CsvSource; import org.miracum.streams.ume.obdstofhir.FhirProperties; +import org.miracum.streams.ume.obdstofhir.model.ADT_GEKID; +import org.miracum.streams.ume.obdstofhir.model.MeldungExport; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.context.annotation.Import; @@ -96,6 +98,62 @@ void applyPatientIdPattern(String input, String output) { assertThat(actual).isEqualTo(output); } } + + @Nested + @TestPropertySource( + properties = { + "app.patient-id-pattern=G/([0-9]{4})-([0-9]{4})", + "app.enableCheckDigitConv=true" + }) + class UseEnabledCheckDigitConf { + + @ParameterizedTest + @CsvSource({ + "12345,12345", // not matching, return as is ... + // else return complete groups of 4 numbers found in input after "G/" and seperated by "-" + "G/1234-56789,12345678", + "G/1234-5678,12345678", + }) + void shouldCheckDigitConf(String input, String output) { + var actual = ObdsToFhirMapper.getConvertedPatIdFromMeldung(createMeldungExport(input)); + assertThat(actual).isEqualTo(output); + } + } + + @Nested + @TestPropertySource( + properties = { + "app.patient-id-pattern=G/([0-9]{4})-([0-9]{4})", + "app.enableCheckDigitConv=false" + }) + class UseDisabledCheckDigitConf { + + @ParameterizedTest + @CsvSource({ + "12345,12345", // not matching, return as is ... + // else return complete groups of 4 numbers found in input after "G/" and seperated by "-" + "G/1234-56789,G/1234-56789", + "G/1234-5678,G/1234-5678", + }) + void shouldCheckDigitConf(String input, String output) { + var actual = ObdsToFhirMapper.getConvertedPatIdFromMeldung(createMeldungExport(input)); + assertThat(actual).isEqualTo(output); + } + } + + private static MeldungExport createMeldungExport(String patientId) { + var meldungExport = new MeldungExport(); + var data = new ADT_GEKID(); + var patientenStammdaten = new ADT_GEKID.Menge_Patient.Patient.Patienten_Stammdaten(); + patientenStammdaten.setPatient_ID(patientId); + var patient = new ADT_GEKID.Menge_Patient.Patient(); + patient.setPatienten_Stammdaten(patientenStammdaten); + var mengePatient = new ADT_GEKID.Menge_Patient(); + mengePatient.setPatient(patient); + data.setMenge_Patient(mengePatient); + meldungExport.setXml_daten(data); + return meldungExport; + } } @Component From a9a6e0aa0aea0d83a4fb1d2f322de2ce2bfe8918 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 15 Sep 2024 18:27:10 +0200 Subject: [PATCH 08/10] chore(deps): update github-actions (#97) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> [skip ci] --- .github/workflows/ci.yml | 10 +++++----- .github/workflows/schedule.yaml | 2 +- .github/workflows/scorecard.yaml | 4 ++-- .github/workflows/validate-fhir-resources.yaml | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2003ceee..52c65a9e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ permissions: read-all jobs: build: - uses: miracum/.github/.github/workflows/standard-build.yaml@49140a0c55dda78f1694ffb02ef3b182a3347756 # v1.12.2 + uses: miracum/.github/.github/workflows/standard-build.yaml@b2389048770aa5b9ed439810bf84911fbb07f645 # v1.12.3 permissions: contents: write id-token: write @@ -70,7 +70,7 @@ jobs: - name: Add coverage to PR id: jacoco - uses: madrapps/jacoco-report@db72e7e7c96f98d239967958b0a0a6ca7d3bb45f # v1.6.1 + uses: madrapps/jacoco-report@642c39173b270639beeba5e2c6c160bfbba33388 # v1.7.0 with: paths: | ${{ github.workspace }}/test/jacoco/test/jacocoTestReport.xml @@ -148,14 +148,14 @@ jobs: - name: Upload cluster dump if: always() - uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6 + uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 with: name: kind-cluster-dump.txt path: | kind-cluster-dump.txt lint: - uses: miracum/.github/.github/workflows/standard-lint.yaml@49140a0c55dda78f1694ffb02ef3b182a3347756 # v1.12.2 + uses: miracum/.github/.github/workflows/standard-lint.yaml@b2389048770aa5b9ed439810bf84911fbb07f645 # v1.12.3 permissions: contents: read pull-requests: write @@ -170,7 +170,7 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} release: - uses: miracum/.github/.github/workflows/standard-release.yaml@49140a0c55dda78f1694ffb02ef3b182a3347756 # v1.12.2 + uses: miracum/.github/.github/workflows/standard-release.yaml@b2389048770aa5b9ed439810bf84911fbb07f645 # v1.12.3 needs: - lint - build diff --git a/.github/workflows/schedule.yaml b/.github/workflows/schedule.yaml index 7ca4fe40..09ec565c 100644 --- a/.github/workflows/schedule.yaml +++ b/.github/workflows/schedule.yaml @@ -10,7 +10,7 @@ permissions: read-all jobs: schedule: - uses: miracum/.github/.github/workflows/standard-schedule.yaml@49140a0c55dda78f1694ffb02ef3b182a3347756 # v1.12.2 + uses: miracum/.github/.github/workflows/standard-schedule.yaml@b2389048770aa5b9ed439810bf84911fbb07f645 # v1.12.3 permissions: contents: read issues: write diff --git a/.github/workflows/scorecard.yaml b/.github/workflows/scorecard.yaml index 9119d7f9..8bfa602b 100644 --- a/.github/workflows/scorecard.yaml +++ b/.github/workflows/scorecard.yaml @@ -59,7 +59,7 @@ jobs: # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF # format to the repository Actions tab. - name: "Upload artifact" - uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6 + uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 with: name: SARIF file path: results.sarif @@ -67,6 +67,6 @@ jobs: # Upload the results to GitHub's code scanning dashboard. - name: "Upload to code-scanning" - uses: github/codeql-action/upload-sarif@4dd16135b69a43b6c8efb853346f8437d92d3c93 # v3.26.6 + uses: github/codeql-action/upload-sarif@8214744c546c1e5c8f03dde8fab3a7353211988d # v3.26.7 with: sarif_file: results.sarif diff --git a/.github/workflows/validate-fhir-resources.yaml b/.github/workflows/validate-fhir-resources.yaml index 5ee0a068..25e75083 100644 --- a/.github/workflows/validate-fhir-resources.yaml +++ b/.github/workflows/validate-fhir-resources.yaml @@ -12,7 +12,7 @@ jobs: validate-fhir-resource: name: Validate FHIR resources runs-on: ubuntu-22.04 - container: ghcr.io/miracum/ig-build-tools:v2.1.5@sha256:4571ddd801664e2ee8883ae9c22f88d2c5dfe1175b1e93f042ae8bfa9a7e185a + container: ghcr.io/miracum/ig-build-tools:v2.1.6@sha256:26bc1eaf0a259e8c16d0eeeb8622c7aecaa45d41e39f158696f9aec90b142596 steps: - name: Checkout code uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 From 4d536379508b1af5c9c42c82d3b82961fe5b5ec0 Mon Sep 17 00:00:00 2001 From: chgl Date: Mon, 16 Sep 2024 21:26:43 +0200 Subject: [PATCH 09/10] docs: added issue and PR template (#99) * docs: added issue templates * Update custom.md * docs: added PR template * docs: re-org templates [skip ci] --- .github/ISSUE_TEMPLATE/1-bug-report.md | 33 +++++++++++++++++++ .github/ISSUE_TEMPLATE/2-feature-request.md | 19 +++++++++++ .github/ISSUE_TEMPLATE/3-custom.md | 7 ++++ .../pull-request-template.md | 15 +++++++++ .markdownlint.json | 17 ++++++++++ 5 files changed, 91 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/1-bug-report.md create mode 100644 .github/ISSUE_TEMPLATE/2-feature-request.md create mode 100644 .github/ISSUE_TEMPLATE/3-custom.md create mode 100644 .github/PULL_REQUEST_TEMPLATE/pull-request-template.md create mode 100644 .markdownlint.json diff --git a/.github/ISSUE_TEMPLATE/1-bug-report.md b/.github/ISSUE_TEMPLATE/1-bug-report.md new file mode 100644 index 00000000..f3d1ef32 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/1-bug-report.md @@ -0,0 +1,33 @@ +--- +name: Bug report +about: Create a report to help us improve +title: "" +labels: "" +assignees: "" +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: + +1. Go to '...' +1. Click on '....' +1. Scroll down to '....' +1. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Server (please complete the following information):** + +- OS: [e.g. Ubuntu 24.04] +- Container Runtime [e.g. docker, containerd, cri-o, podman] +- Container Runtime Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/2-feature-request.md b/.github/ISSUE_TEMPLATE/2-feature-request.md new file mode 100644 index 00000000..2bc5d5f7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/2-feature-request.md @@ -0,0 +1,19 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: "" +labels: "" +assignees: "" +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/ISSUE_TEMPLATE/3-custom.md b/.github/ISSUE_TEMPLATE/3-custom.md new file mode 100644 index 00000000..166c3d3a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/3-custom.md @@ -0,0 +1,7 @@ +--- +name: Custom issue template +about: For anything that isn't a bug or feature request. +title: "" +labels: "" +assignees: "" +--- diff --git a/.github/PULL_REQUEST_TEMPLATE/pull-request-template.md b/.github/PULL_REQUEST_TEMPLATE/pull-request-template.md new file mode 100644 index 00000000..69d80f78 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/pull-request-template.md @@ -0,0 +1,15 @@ +## Describe your changes + + + +## Issue ticket number and link + + + +## Checklist before requesting a review + + + +- [ ] The commit message follows the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) standard +- [ ] I have added tests that prove my fix is effective or that my feature works +- [ ] I have made corresponding changes to the documentation diff --git a/.markdownlint.json b/.markdownlint.json new file mode 100644 index 00000000..23762ed9 --- /dev/null +++ b/.markdownlint.json @@ -0,0 +1,17 @@ +{ + "MD004": false, + "MD007": { + "indent": 2 + }, + "MD013": { + "line_length": 400 + }, + "MD026": { + "punctuation": ".,;:!。,;:" + }, + "MD029": false, + "MD033": false, + "MD036": false, + "blank_lines": false, + "MD041": false +} From d8526ede30514fadef5dbbd9b71e7b75c9fc7367 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 16 Sep 2024 21:39:24 +0200 Subject: [PATCH 10/10] chore(deps): update gcr.io/distroless/java21-debian12:nonroot docker digest to b76becb (#95) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: chgl [skip ci] --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 4be6e468..6aab914b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,7 +23,7 @@ apt-get clean rm -rf /var/lib/apt/lists/* EOF -FROM gcr.io/distroless/java21-debian12:nonroot@sha256:5723ccd77a896c16242057b788a3341b265329fc1cbcb5b0add34cfd97057554 +FROM gcr.io/distroless/java21-debian12:nonroot@sha256:b76becbcc22abb3aa840d01db307f8dac837beea47f838bd4f62d60788164214 WORKDIR /opt/obds-to-fhir ENV LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libjemalloc.so"