preserve message id from terminology service so editors can use it in suppressed-messages.txt

This commit is contained in:
Grahame Grieve 2024-04-03 20:13:34 +11:00
parent eb7d66685e
commit 0d57115ede
2 changed files with 5 additions and 0 deletions

View File

@ -182,6 +182,7 @@ public class ValueSetProcessBase {
// this is a testing hack - see TerminologyServiceTests
iss.get(0).setUserData("status-msg-name", "warning-"+id);
iss.get(0).setUserData("status-msg-value", new UriType(resource.getVersionedUrl()));
ToolingExtensions.setStringExtension(iss.get(0), ToolingExtensions.EXT_ISSUE_MSG_ID, msg);
return iss;
}

View File

@ -736,6 +736,10 @@ public class BaseValidator implements IValidationContextResourceLoader {
if (issue.getExtensionString(ToolingExtensions.EXT_ISSUE_SERVER) != null) {
vmsg.setServer(issue.getExtensionString(ToolingExtensions.EXT_ISSUE_SERVER).replace("local.fhir.org", "tx-dev.fhir.org"));
}
if (issue.getExtensionString(ToolingExtensions.EXT_ISSUE_MSG_ID) != null) {
vmsg.setMessageId(issue.getExtensionString(ToolingExtensions.EXT_ISSUE_MSG_ID));
}
errors.add(vmsg);
return vmsg;
}