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

Shouldn't aliases expand inside other alias definitions #356

Open
keithboone opened this issue Apr 13, 2020 · 4 comments
Open

Shouldn't aliases expand inside other alias definitions #356

keithboone opened this issue Apr 13, 2020 · 4 comments
Labels
added to backlog Added to the team's Jira backlog

Comments

@keithboone
Copy link

Alias: $Base = http://hl7.org/fhir/us/saner
ValueSet: Populations
Title: "Measure Populations"
Description: "Measure Populations defined by The SANER Project"

  • codes from system PopulationSystem
    Alias: Populations = $Base/ValueSet/Populations

Doesn't seem to work the way I expect. I have to expand to:
ValueSet: Populations
Title: "Measure Populations"
Description: "Measure Populations defined by The SANER Project"

@ngfreiter
Copy link
Contributor

As another example of how Alias expansion might work, see this thread: https://chat.fhir.org/#narrow/stream/215610-shorthand/topic/Bug.20when.20using.20SNOMED.20Version.20URLs. The example below does not work, because the individual Aliases do not resolve within the rule. The whole sequence is resolves as one alias SCT|SCTIntlMar2020, which of course does not exist. If the functionality of Alias expansion is expanded, we should consider cases like the one shown below.

Alias: SCT = http://snomed.info/sct
Alias: SCTIntlMar2020 = http://snomed.info/sct/900000000000207008/20200309

ValueSet:  SCTBodySitesVS
Id: sctBodySitesVS
Title: "Seitenlokalisation nach SNOMED CT"
Description:  "Seitenlokalisation z.B. einer Prozedure"

* SCT|SCTIntlMar2020#85421007 "Structure of right half of body (body structure)"
* SCT|SCTIntlMar2020#31156008 "Structure of left half of body (body structure)"

@cmoesel
Copy link
Member

cmoesel commented Apr 23, 2020

This is an interesting question. I was initially a little concerned about unintentional expansion of aliases (e.g., if the value of an alias just happens to have another alias as a substring) but I think we can avoid that by smart implementation and rules. Using $ prefix would help, but I think the following rules would likely be sufficient:

  • For an alias to be expanded inside an alias:
    • it must be at the start of the alias value
    • it must be followed by a /, ?, or whitepace

So... imagining Keith's example (but without the $, just to make it trickier)... Given:

Alias: Base = http://hl7.org/fhir/us/saner

Then the alias Base would be expanded in these situations:

Alias A: Base/ValueSet/Populations // http://hl7.org/fhir/us/saner/ValueSet/Populations
Alias B: Base?vs=Populations // http://hl7.org/fhir/us/saner?vs=Populations
Alias C: Base // http://hl7.org/fhir/us/saner

but it would not be expanded in these situations:

Alias A: http://example.org/ValueSet/BasePopulations 
Alias B: http://example.org/ValueSet/Base/Populations 
Alias C: BasePopulations/ValueSet/BP
Alias D: BasePopulations
// etc.

@markkramerus -- what do you think?

(BTW: This doesn't address the issue @ngfreiter pointed out for using aliases as a CS version).

1 similar comment
@cmoesel
Copy link
Member

cmoesel commented Apr 23, 2020

This is an interesting question. I was initially a little concerned about unintentional expansion of aliases (e.g., if the value of an alias just happens to have another alias as a substring) but I think we can avoid that by smart implementation and rules. Using $ prefix would help, but I think the following rules would likely be sufficient:

  • For an alias to be expanded inside an alias:
    • it must be at the start of the alias value
    • it must be followed by a /, ?, or whitepace

So... imagining Keith's example (but without the $, just to make it trickier)... Given:

Alias: Base = http://hl7.org/fhir/us/saner

Then the alias Base would be expanded in these situations:

Alias A: Base/ValueSet/Populations // http://hl7.org/fhir/us/saner/ValueSet/Populations
Alias B: Base?vs=Populations // http://hl7.org/fhir/us/saner?vs=Populations
Alias C: Base // http://hl7.org/fhir/us/saner

but it would not be expanded in these situations:

Alias A: http://example.org/ValueSet/BasePopulations 
Alias B: http://example.org/ValueSet/Base/Populations 
Alias C: BasePopulations/ValueSet/BP
Alias D: BasePopulations
// etc.

@markkramerus -- what do you think?

(BTW: This doesn't address the issue @ngfreiter pointed out for using aliases as a CS version).

@ngfreiter ngfreiter added the added to backlog Added to the team's Jira backlog label May 4, 2020
@keithboone
Copy link
Author

Added to ballot comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
added to backlog Added to the team's Jira backlog
Projects
None yet
Development

No branches or pull requests

3 participants