hapi-fhir
hapi-fhir copied to clipboard
Change linkIds in Questionnaire validation messages to item's display text
Describe the issue Assuming that messages from Questionnaire validations addresses end-users the linkId should be replaced by the item's display text. The linkId is a technical data an end-user can't work with.
Current implementation (example)
String message = context.formatMessage(I18nConstants.QUESTIONNAIRE_QR_ITEM_MISSING, qItem.getLinkId());
https://github.com/hapifhir/org.hl7.fhir.core/blob/48023c0ba429630e3060a60b213195b85906b2a8/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/type/QuestionnaireValidator.java#L695
Additional context If there are scenarios in which a linkId makes acually sense, a validation option to get eiher the linkId or the display text would be fine.