Stream: shorthand
Topic: Using Canonicals
Jose Costa Teixeira (Feb 05 2021 at 22:07):
I don't know what causes this difference:
Jose Costa Teixeira (Feb 05 2021 at 22:07):
in my questionnaire I have a
* item[=].answerValueSet = Canonical(hiv-transmission-route)
Jose Costa Teixeira (Feb 05 2021 at 22:08):
if I have this, it works OK
ValueSet: HIVTransmissionRoute
Id: hiv-transmission-route
Title: "HIV Transmission Route"
Description: "HIV Transmission Route"
Jose Costa Teixeira (Feb 05 2021 at 22:08):
If I declare it as an instance, it does not work:
Instance: hiv-transmission-route
InstanceOf: ValueSet
Description: "HIV Transmission Route codes"
Title: "HIV Transmission Route"
* name = "HIVTransmissionRoute"
* status = #draft
Jose Costa Teixeira (Feb 05 2021 at 22:09):
"does not work" means: sushi is OK with it, but the publisher does not find it.
Jose Costa Teixeira (Feb 05 2021 at 22:09):
I am about to debug this but I just took the lazy path to see if I am missing something obvious
Jose Costa Teixeira (Feb 05 2021 at 22:22):
The difference I find between the two approaches is that the latter does not set the ValueSet.url
I can set that manually, but before I hardcode URLs (and the consequent Change request to Sushi), is there something obvious I'm missing?
Jose Costa Teixeira (Feb 05 2021 at 22:23):
If not, question / change request:
Can sushi produce implicit alias like $canonicalURL which take the IG's canonical URL?
ryan moehrke (Feb 05 2021 at 23:24):
if you declare an instance of a ValueSet does Sushi (and FSH) know what the canonicalUrl is for that instance? I would expect in an instanceOf you would have to explicitly give it a url that you could then use in your questionnaire
Jose Costa Teixeira (Feb 05 2021 at 23:29):
Correct, but that goes against the portability of fsh files (I can use them in different IGs)
Jose Costa Teixeira (Feb 05 2021 at 23:30):
Sushi does know the canonicalUrl for the definitional resources (taken from the IG or from the config.yaml, I guess)
Elliot Silver (Feb 05 2021 at 23:30):
Canonicals are only recoginized for things that you create with ValueSet: or Profile:, not with Instance.
Elliot Silver (Feb 05 2021 at 23:31):
You'll have to manually set the URL for your instance, and reference by typing in the URL.
Jose Costa Teixeira (Feb 05 2021 at 23:31):
Yes, so wouldn't it make sense that the canonical is stored somewhere as a implicit alias?
Jose Costa Teixeira (Feb 05 2021 at 23:31):
I did (well, I did that, then found it was not what I wanted, and solved my problem another way)
Elliot Silver (Feb 05 2021 at 23:31):
It would. See my discussion with Chris eaerlier this week.
Jose Costa Teixeira (Feb 05 2021 at 23:32):
which stream/thread?
Last updated: Apr 12 2022 at 19:14 UTC