fix narrative rendering

This commit is contained in:
Grahame Grieve 2023-08-02 22:53:57 +10:00
parent db0413c735
commit b23e31d44c
1 changed files with 24 additions and 20 deletions

View File

@ -114,13 +114,15 @@ public class ValueSetProcessBase {
} }
public void checkCanonical(List<OperationOutcomeIssueComponent> issues, String path, CanonicalResource resource) { public void checkCanonical(List<OperationOutcomeIssueComponent> issues, String path, CanonicalResource resource) {
StandardsStatus standardsStatus = ToolingExtensions.getStandardsStatus(resource); if (resource != null) {
if (standardsStatus == StandardsStatus.DEPRECATED) { StandardsStatus standardsStatus = ToolingExtensions.getStandardsStatus(resource);
addToIssues(issues, makeStatusIssue(path, "deprecated", I18nConstants.MSG_DEPRECATED, resource)); if (standardsStatus == StandardsStatus.DEPRECATED) {
} else if (standardsStatus == StandardsStatus.WITHDRAWN) { addToIssues(issues, makeStatusIssue(path, "deprecated", I18nConstants.MSG_DEPRECATED, resource));
addToIssues(issues, makeStatusIssue(path, "withdrawn", I18nConstants.MSG_WITHDRAWN, resource)); } else if (standardsStatus == StandardsStatus.WITHDRAWN) {
} else if (resource.getStatus() == PublicationStatus.RETIRED) { addToIssues(issues, makeStatusIssue(path, "withdrawn", I18nConstants.MSG_WITHDRAWN, resource));
addToIssues(issues, makeStatusIssue(path, "retired", I18nConstants.MSG_RETIRED, resource)); } else if (resource.getStatus() == PublicationStatus.RETIRED) {
addToIssues(issues, makeStatusIssue(path, "retired", I18nConstants.MSG_RETIRED, resource));
}
} }
} }
@ -149,19 +151,21 @@ public class ValueSetProcessBase {
} }
public void checkCanonical(ValueSetExpansionComponent params, CanonicalResource resource) { public void checkCanonical(ValueSetExpansionComponent params, CanonicalResource resource) {
StandardsStatus standardsStatus = ToolingExtensions.getStandardsStatus(resource); if (resource != null) {
if (standardsStatus == StandardsStatus.DEPRECATED) { StandardsStatus standardsStatus = ToolingExtensions.getStandardsStatus(resource);
if (!params.hasParameterValue("warning-deprecated", resource.getVersionedUrl())) { if (standardsStatus == StandardsStatus.DEPRECATED) {
params.addParameter("warning-deprecated", new UriType(resource.getVersionedUrl())); if (!params.hasParameterValue("warning-deprecated", resource.getVersionedUrl())) {
} params.addParameter("warning-deprecated", new UriType(resource.getVersionedUrl()));
} else if (standardsStatus == StandardsStatus.WITHDRAWN) { }
if (!params.hasParameterValue("warning-withdrawn", resource.getVersionedUrl())) { } else if (standardsStatus == StandardsStatus.WITHDRAWN) {
params.addParameter("warning-withdrawn", new UriType(resource.getVersionedUrl())); if (!params.hasParameterValue("warning-withdrawn", resource.getVersionedUrl())) {
} params.addParameter("warning-withdrawn", new UriType(resource.getVersionedUrl()));
} else if (resource.getStatus() == PublicationStatus.RETIRED) { }
if (!params.hasParameterValue("warning-retired", resource.getVersionedUrl())) { } else if (resource.getStatus() == PublicationStatus.RETIRED) {
params.addParameter("warning-retired", new UriType(resource.getVersionedUrl())); if (!params.hasParameterValue("warning-retired", resource.getVersionedUrl())) {
} params.addParameter("warning-retired", new UriType(resource.getVersionedUrl()));
}
}
} }
} }