Stream: tooling
Topic: Forge allowing for a 255 Max Length limit on Resource.id
Ken Sinn (Dec 23 2020 at 15:04):
Hi @Ward Weistra
I noticed that Forge allows for a Max String Length constraint on Resource.id fields. By definition, the id datatype is already limited to 64 characters (https://www.hl7.org/fhir/datatypes.html#id). As an example, while profiling MessageHeader, MessageHeader.id allows for maxLength modification, while MessageHeader.resource.identifier (also "id" datatype) does not allow for maxLength modification.
Any reason for allowing modification on Resource.id values?
Ward Weistra (Dec 23 2020 at 16:48):
Hi @Ken Sinn, thanks for reaching out! We'll look into why that difference is there. Just an inconsistency you noticed or is it limiting your use of Forge right now?
And is this FHIR R4 you're looking at? (In R4 these .id's are secretly System.String's under the hood, not sure if that's related to anything)
Ken Sinn (Dec 23 2020 at 16:50):
Just an inconsistency, @Ward Weistra , no functional impact for us, figured it's worth pointing out. v26 fixing the order of elements was a much bigger issue, so glad that was finally solved. Thanks! I had to manually edit every differential profile, and then re-generate the snapshots using validator.
Ward Weistra (Dec 23 2020 at 16:51):
So sorry for that, happy to hear it's resolved now!
Ardon Toonstra (Dec 24 2020 at 09:52):
Looking at the MessageHeader R4 StructureDefinition makes me believe the inconsistency originates here.
<element id="MessageHeader.id">
<path value="MessageHeader.id" />
....
<type>
<extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type">
<valueUrl value="string" />
</extension>
<code value="http://hl7.org/fhirpath/System.String" />
</type>
<element id="MessageHeader.response.identifier">
<path value="MessageHeader.response.identifier" />
....
<type>
<code value="id" />
</type>
Ardon Toonstra (Dec 24 2020 at 09:54):
Perhaps the FHIR spec forgot the MessageHeader.response.identifier element?
Ward Weistra (Dec 24 2020 at 13:42):
@Ken Sinn Can you confirm you meant MessageHeader.response.identifier
(Since there is no MessageHeader.resource.identifier
)?
Indeed, when I have 'Options > Show common resource elements' on I can set a Maximum string length on MessageHeader.id and MessageHeader.response.id (which both are the System.String under the hood since R4), but not on MessageHeader.response.identifier (which is still of type id).
@Grahame Grieve Should I create a ticket to make MessageHeader.response.identifier also a System.String?
Ken Sinn (Dec 24 2020 at 14:02):
YEs, @Ward Weistra confirmed that it is MessageHeader.response.identifier -- typo, thanks. I also wonder if there are any rules in place to enforce that restrictions on type.id should be < 64 characters based on the regex. I know that IDs are System.String under the hood, but then isn't anything greater than 64 redundant and possibly misleading? (maybe this is a question for Graham)
Grahame Grieve (Dec 25 2020 at 00:29):
@Ward Weistra yes you should create a task
Ward Weistra (Feb 11 2021 at 14:37):
@Firely Bot issue create "MessageHeader.response.identifier should be System.String"
MessageHeader.response.identifier is still of type id, while other id fields, like MessageHeader.id and MessageHeader.response.id, are now of type System.String.
Firely Bot (Feb 11 2021 at 14:37):
Select the issue type from project FHIR you want to report:
Change Request, Technical Correction, Question or Comment
Don't have an HL7 Jira account yet? Create one for free.
Ward Weistra (Feb 11 2021 at 14:39):
Ward Weistra (Feb 14 2021 at 20:09):
@Firely Bot issue show FHIR-31055
Firely Bot (Feb 14 2021 at 20:09):
FHIR-31055 MessageHeader.response.identifier should be System.String
Status: Triaged, Type: Technical Correction
Last updated: Apr 12 2022 at 19:14 UTC