From 8b2535edefaf80414583e5af92387b4936327bd4 Mon Sep 17 00:00:00 2001 From: nmorasb Date: Thu, 16 Nov 2023 11:03:28 -0500 Subject: [PATCH] ref MAT-6434: remove double escape, add escape for measure authors --- .../services/HumanReadableService.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main/java/gov/cms/madie/madiefhirservice/services/HumanReadableService.java b/src/main/java/gov/cms/madie/madiefhirservice/services/HumanReadableService.java index a2dc7ddb..e000ead3 100644 --- a/src/main/java/gov/cms/madie/madiefhirservice/services/HumanReadableService.java +++ b/src/main/java/gov/cms/madie/madiefhirservice/services/HumanReadableService.java @@ -62,8 +62,15 @@ private void escapeTopLevelProperties(org.hl7.fhir.r5.model.Measure measure) { measure.setSubtitle(escapeStr(measure.getSubtitle())); measure.setRiskAdjustment(escapeStr(measure.getRiskAdjustment())); measure.setRateAggregation(escapeStr(measure.getRateAggregation())); - measure.setClinicalRecommendationStatement( - escapeStr(measure.getClinicalRecommendationStatement())); + if (measure.hasAuthor()) { + measure.setAuthor( + measure.getAuthor().stream() + .map( + contactDetail -> { + return contactDetail.setName(escapeStr(contactDetail.getName())); + }) + .collect(Collectors.toList())); + } } private void escapeIdentifiers(org.hl7.fhir.r5.model.Measure measure) {