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

Investigate the change of the identifier format in the FHIR Library resource #714

Open
baseTwo opened this issue Jan 29, 2025 · 12 comments
Open
Assignees

Comments

@baseTwo
Copy link
Collaborator

baseTwo commented Jan 29, 2025

The format of the id in a FHIR Library Resource was changed from {libraryName}-{libraryVersion} to {libraryName} in this PR

Please look into why this was needed, since there is a need to have resources with duplicate names but diferent versions

@baseTwo
Copy link
Collaborator Author

baseTwo commented Jan 29, 2025

@and-hus would you add more detail to this ticket so that @richfirely could pick it up?

@baseTwo baseTwo assigned baseTwo and richfirely and unassigned baseTwo Jan 29, 2025
@baseTwo baseTwo changed the title Change the identifier format in the FHIR Library resource back to including the version Investigate the change of the identifier format in the FHIR Library resource Jan 29, 2025
@alexzautke
Copy link
Member

+1 for {libraryName}-{libraryVersion}

@richfirely
Copy link
Contributor

I researched and this was done to simplify tracking in FHIR servers. I'd like to take this opportunity to outline how ID and other identifying fields should look and get feedback. Stay tuned for the next comment.

@richfirely
Copy link
Contributor

Make the following adjustments to Library Resource:

Field Format C# Comments
Id libraryName-libraryVersion elmLibrary.GetVersionedIdentifier() Move back to both name and version. This will break file generation due to dash checking. See Name.
Version libraryVersion elmLibrary.identifier?.version! Remains the same
Name libraryName elmLibrary.identifier?.id! Remains the same. Use this for file name generation. https://hl7.org/fhir/R4/library-definitions.html#Library.name
Url RootUrl/Library/Name Library.CanonicalUri(resourceCanonicalRootUrl) Switch to elmLibrary.identifier?.Id! (Library.Name) https://hl7.org/fhir/R4/library-definitions.html#Library.url This extension seems misnamed or unintended. Given the name, I would expect this extension to result in a canonical reference with version, if exists. Url is uri datatype and should not include version. Retire. Create alternative logic.
relatedArtifact resource RootUrl/Library/Name|Version

Perform similar alignment for Measure resource.

  • Measure.Library RootUrl/Library/Name|Version

Code Adjustments:

  • Retire Resource.CanonicalUri
  • WriteToFileFhirResourcePostProcessor - replace Id with Name.
  • ResourceFileNames - change Id to name for consistency and avoid future confusion.
  • ResourcePackager - adjust fields as above. Refactor, comment, and cleanup in prep for future PR for measure templates.
  • Consider overload to GetVersionedIdentifier to change the delimiting character, such as pipe for generating part of the full canonical for Measure.Library.
  • Fix bug where Library.Parameters contains valuesets as IN parameters. Move to related artifact.

Suggestions/concerns are welcome.

@alexzautke
Copy link
Member

Counterpoint to "Remains the same. Use this for file name generation." for file name generation:
https://hl7.org/fhir/uv/cql/conformance.html is saying that the filename for the CQL file should be "-.cql", so I'd suggest that "-< libraryVersion>.json" should be the filename for the Library.

@richfirely
Copy link
Contributor

Counterpoint to "Remains the same. Use this for file name generation." for file name generation: https://hl7.org/fhir/uv/cql/conformance.html is saying that the filename for the CQL file should be "-.cql", so I'd suggest that "-< libraryVersion>.json" should be the filename for the Library.

That is correct now and will stay that way. My item was about using Library.Name - elmLibrary.identifier.id as the input for file name generation. It is using Library.Id right now, which is changing back to have the dash version suffix so it cannot continue to be used.

@alexzautke
Copy link
Member

Ah got it. Thanks.

@and-hus
Copy link
Contributor

and-hus commented Feb 3, 2025

The resource field in relatedArtifact has a format of <RootUrl>/Library/<Name>|<Version> - mind the pipe symbol as a separator...

What do you think about using the pipe symbol for the Id as well:
<Name>|<Version> ?

@alexzautke
Copy link
Member

What do you think about using the pipe symbol for the Id as well

The id datatype does not allow for this

@alexzautke alexzautke reopened this Feb 3, 2025
@alexzautke
Copy link
Member

Ups, wrong button :D

@and-hus
Copy link
Contributor

and-hus commented Feb 3, 2025

The id datatype does not allow for this

Aaah, you are right, Id allows only [A-Za-z0-9\-\.]{1,64} ...
Sorry, I should have checked first ;-)

@and-hus
Copy link
Contributor

and-hus commented Feb 11, 2025

The proposal looks good to me.
Nothing to add from my end.

Thanks for picking it up ;-)

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

No branches or pull requests

4 participants