This commit is contained in:
Grahame Grieve 2023-10-16 23:13:46 +11:00
parent 1e98e69338
commit ac10ddc9ac
3 changed files with 23 additions and 5 deletions

View File

@ -1518,6 +1518,15 @@ public class StructureDefinitionRenderer extends ResourceRenderer {
if (!c.getPieces().isEmpty()) { c.addPiece(gen.new Piece("br")); }
c.addPiece(gen.new Piece(null, "Instances of this logical model cannot be the target of a Reference", null).addStyle("font-weight:bold"));
}
String ps = ToolingExtensions.readStringExtension(profile, ToolingExtensions.EXT_PROFILE_STYLE);
if (ps != null) {
if (!c.getPieces().isEmpty()) { c.addPiece(gen.new Piece("br")); }
if ("cda".equals(ps)) {
c.addPiece(gen.new Piece(null, "Instances of this type are validated by templateId", null).addStyle("font-weight:bold"));
} else {
c.addPiece(gen.new Piece(null, "Instances of this type are validated using an unknown approach: "+ps, null).addStyle("font-weight:bold"));
}
}
}
}
if (definition != null) {
@ -3564,6 +3573,14 @@ public class StructureDefinitionRenderer extends ResourceRenderer {
} else {
tableRow(tbl, "Logical Model", null, strikethrough, "Instances of this logical model cannot be the target of a Reference");
}
String ps = ToolingExtensions.readStringExtension(sd, ToolingExtensions.EXT_PROFILE_STYLE);
if (ps != null) {
if ("cda".equals(ps)) {
tableRow(tbl, "Validation", null, strikethrough, "Instances of this type are validated by templateId");
} else {
tableRow(tbl, "Validation", null, strikethrough, "Instances of this type are validated using an unknown approach: "+ps);
}
}
}
if (root && sd.hasExtension(ToolingExtensions.EXT_SD_IMPOSE_PROFILE)) {

View File

@ -257,6 +257,7 @@ public class ToolingExtensions {
public static final String EXT_NO_BINDING = "http://hl7.org/fhir/tools/StructureDefinition/no-binding";
public static final String EXT_ID_CHOICE_GROUP = "http://hl7.org/fhir/tools/StructureDefinition/xml-choice-group";
public static final String EXT_DATE_RULES = "http://hl7.org/fhir/tools/StructureDefinition/elementdefinition-date-rules";
public static final String EXT_PROFILE_STYLE = "http://hl7.org/fhir/tools/StructureDefinition/type-profile-style";
// specific extension helpers

View File

@ -232,7 +232,7 @@ Type_Specific_Checks_DT_URL_Resolve = URL value ''{0}'' does not resolve
Type_Specific_Checks_DT_UUID_Strat = UUIDs must start with urn:uuid:
Type_Specific_Checks_DT_UUID_Valid = UUIDs must be valid and lowercase ({0})
Validation_BUNDLE_Message = The first entry in a message must be a MessageHeader
Validation_VAL_Content_Unknown = Unrecognised Content {0}
Validation_VAL_Content_Unknown = Unrecognized Content {0}
Validation_VAL_NoType = Unknown type {0}
Validation_VAL_Profile_MatchMultiple = Profile {0}, Element matches more than one slice - {1}, {2}
## for the next 4 messages, the available parameters are: 0: profile url, 1: ed.path, 2: ed.id, 3: ed.sliceName, 4: ed.label, 5: element.path, 6: ed.min and optionally 7: actual count
@ -305,7 +305,7 @@ No_reference_resolving_discriminator__from_ = No reference resolving discriminat
Unable_to_resolve_element__in_profile_ = Unable to resolve element {0} in profile {1}
Unable_to_resolve_profile_ = Unable to resolve profile {0}
Resource_resolution_services_not_provided = Resource resolution services not provided
Unrecognised_extension_context_ = Unrecognised extension context {0}
Unrecognised_extension_context_ = Unrecognized extension context {0}
Unable_to_locate_the_profile__in_order_to_validate_against_it = Unable to locate the profile ''{0}'' in order to validate against it
Reference__refers_to_a__not_a_ValueSet = Reference {0} refers to a {1} not a ValueSet
Not_done_yet_ValidatorHostServicesconformsToProfile_when_item_is_not_an_element = Not done yet (ValidatorHostServices.conformsToProfile), when item is not an element
@ -394,9 +394,9 @@ Does_not_match_slice_ = Does not match slice ''{0}'' (discriminator: {1})
Profile__does_not_match_for__because_of_the_following_profile_issues__ = Profile {0} does not match for {1} because of the following profile issues: {2}
This_element_does_not_match_any_known_slice_ = This element does not match any known slice {0}
defined_in_the_profile = Defined in the profile
This_does_not_appear_to_be_a_FHIR_resource_unknown_name_ = This content cannot be parsed (unknown or unrecognised XML root element name ''{0}'')
This_does_not_appear_to_be_a_FHIR_resource_unknown_name_ = This content cannot be parsed (unknown or unrecognized resource name ''{0}'')
This_cannot_be_parsed_as_a_FHIR_object_no_name = This content cannot be parsed (no name)
This_does_not_appear_to_be_a_FHIR_resource_unknown_namespacename_ = This content cannot be parsed (unknown or unrecognised XML Root element namespace/name ''{0}::{1}'')
This_does_not_appear_to_be_a_FHIR_resource_unknown_namespacename_ = This content cannot be parsed (unknown or unrecognized XML Root element namespace/name ''{0}::{1}'')
This__cannot_be_parsed_as_a_FHIR_object_no_namespace = This ''{0}'' cannot be parsed (no namespace on the XML Root element)
Unable_to_find_resourceType_property = Unable to find resourceType property
Error_parsing_JSON_the_primitive_value_must_be_a_string = Error parsing JSON: the primitive value must be a string
@ -427,7 +427,7 @@ Unknown_resource_type_missing_rdfstype = Unknown resource type (missing rdfs:typ
reference_to__cannot_be_resolved = reference to {0} cannot be resolved
This_property_must_be_a_URI_or_bnode_not_ = This property must be a URI or bnode, not {0}
This_property_must_be_a_Literal_not_ = This property must be a Literal, not {0}
Unrecognised_predicate_ = Unrecognised predicate ''{0}''
Unrecognised_predicate_ = Unrecognized predicate ''{0}''
Error_parsing_Turtle_ = Error parsing Turtle: {0}
Unexpected_datatype_for_rdfstype = Unexpected datatype for rdfs:type
Attempt_to_replace_element_name_for_a_nonchoice_type=Attempt to replace element name for a non-choice type