Skip to content

Commit

Permalink
[26759] correct mediorder article billing (#751)
Browse files Browse the repository at this point in the history
Co-authored-by: pdenzler <pdenzler@DESKTOP-1LRDH28>
  • Loading branch information
PatrickDenzler and pdenzler authored Nov 20, 2024
1 parent 42e2d49 commit 1b6d77c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ private IStatus processArticles(List<IStockEntry> articles, IPatient patient, bo
Optional<ICoverage> coverage = coverageService.getLatestOpenCoverage(patient);
if (isObligatory) {
if (coverage.isEmpty() || !coverage.get().getBillingSystem().getLaw().equals(BillingLaw.KVG)) {
coverage = Optional.of(coverageService.createDefaultCoverage(patient));
coverage = getOrCreateCoverage(patient, BillingLaw.KVG);
}
} else {
if (coverage.isEmpty() || !(coverage.get().getBillingSystem().getLaw().equals(BillingLaw.ORG)
Expand All @@ -119,7 +119,7 @@ private Optional<ICoverage> getOrCreateCoverage(IPatient patient, BillingLaw law
if (coverage.isEmpty()) {
coverage = Optional
.of(new ICoverageBuilder(coreModelService, patient, coverageService.getDefaultCoverageLabel(),
coverageService.getDefaultCoverageReason(), BillingLaw.privat.toString()).buildAndSave());
coverageService.getDefaultCoverageReason(), law.toString()).buildAndSave());
}
return coverage;
}
Expand Down

0 comments on commit 1b6d77c

Please sign in to comment.