Skip to content

Commit

Permalink
BS-226 | BS-225 | generate same UUID for the given substance
Browse files Browse the repository at this point in the history
  • Loading branch information
manimaarans committed Sep 25, 2023
1 parent 25554f9 commit f836d6b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ public List<CDSCard> checkMedications(List<MedicationRequest> medicationRequests
Double dosageWeight = getDosageWeight(substanceEntry.getValue().getDosageMapByRoute());
String alertLevelIndicator = getAlertIndicator(dosageWeight);
if (StringUtils.isNotBlank(alertLevelIndicator)) {
UUID randomUuid = UUID.randomUUID();
UUID randomUuid = UUID.fromString(UUID.nameUUIDFromBytes(substanceName.getBytes()).toString());
String cardDetailMessage = getCardDetailsInMarkDown(substanceEntry.getValue(), dosageWeight);
String cardSummaryMessage = String.format(getCardSummaryTemplate(), substanceName, getDecimalPlace(dosageWeight));
CDSCard cdsCard = new CDSCard(randomUuid.toString(), cardSummaryMessage, cardDetailMessage, CDSIndicator.valueOf(alertLevelIndicator), new CDSSource("Source", null),
Expand Down

0 comments on commit f836d6b

Please sign in to comment.