Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improper length requirement on root^extension #597

Open
JohnMoehrke opened this issue Oct 10, 2023 · 9 comments
Open

Improper length requirement on root^extension #597

JohnMoehrke opened this issue Oct 10, 2023 · 9 comments

Comments

@JohnMoehrke
Copy link

https://github.com/usnistgov/iheos-toolkit2/blob/61b612a7378e1df32f8685ac13f1a14b1bf69002/validators-registry-metadata/src/main/java/gov/nist/toolkit/valregmetadata/validators/RegistryObjectValidator.java#L116C1-L116C1

I don't think that this 15 character limit is legitimate. Where did this requirement come from? Even elsewhere where CXi is used IHE clearly specifies that any underlying HL7 v2 requirement on extension to be 15 characters does not apply. And certainly does not apply to CDA document/id which is HL7 v3 II.

@skbhaskarla
Copy link
Collaborator

Hi @JohnMoehrke
The code you referenced enforces 16 characters max, not 15. See requirements here:

The structure and format of this Id shall be consistent with the specification corresponding to the formatCode attribute. (e.g. for a DICOM standard document a 64-character numeric UID, for an HL7 CDA format a serialization of the CDA Document Id extension and root in the form "oid^extension", where OID is a 64 digits max, and the Id is a 16 UTF-8 char max. If the OID is coded without the extension then the '^' character shall not be included.).

Reference:
https://hl7.org/fhir/R4/documentreference-definitions.html#masterIdentifier

@JohnMoehrke
Copy link
Author

I will look into this. The text you quote has been removed from FHIR in R5, which would seem to indicate that it was not perfectly correct.

I noticed this problem when working with a developer that had extensions larger than 15 characters.

@skbhaskarla
Copy link
Collaborator

skbhaskarla commented Dec 7, 2023

The initial version of the NIST HL7 FHIR Toolkit was built into the NIST XDS Toolkit, so some of the FHIR-based validation was enforced in XDS Toolkit validators.

The FHIR Toolkit code now exists as its own toolkit code base so the older validation code might not be necessary in XDS Toolkit.

@JohnMoehrke
Copy link
Author

I am sure that even the English is expressing that the id must be at least 80 characters.

CDA Document Id extension and root in the form "oid^extension", where OID is a 64 digits max, and the Id is a 16 UTF-8 char max.

so OID at 64, and extension at 16 => 80 (plus one more for the '^')

@JohnMoehrke
Copy link
Author

I am checking with Tone and Keith... But also on zulip
https://chat.fhir.org/#narrow/stream/229921-CDA/topic/CDA.20id.20format.20requirements

@skbhaskarla
Copy link
Collaborator

I am sure that even the English is expressing that the id must be at least 80 characters.

CDA Document Id extension and root in the form "oid^extension", where OID is a 64 digits max, and the Id is a 16 UTF-8 char max.

so OID at 64, and extension at 16 => 80 (plus one more for the '^')

I was only referring to the source code line you asked a question about, this has nothing to do with the first part of the array.

@JohnMoehrke
Copy link
Author

okay. My question to Keith and zulip has not yet gotten an answer. Tone indicated he has no knowledge of a limit like this.

@JohnMoehrke
Copy link
Author

I have found in the "CDA R2 Normative Web Edition" the section on the Instance Identifier (II). It has no length requirements. I can't copy the whole thing, but you should be able to get access to this.

Here is the path fragment within this publication
CDA_R2_NormativeWebEdition2005/infrastructure/datatypes/datatypes.htm#prop-II.extension

@JohnMoehrke
Copy link
Author

JohnMoehrke commented Dec 8, 2023

Note that within IHE we do have a 64 character max. However there are plenty of discussions that this should not be considered a hard limit. There are some that can handle more and they want to have longer values. So even this should not be considered a hard requirement
https://profiles.ihe.net/ITI/TF/Volume3/ch-4.2.html#4.2.3.2.18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants