FHIR Chat · Warning about name despite override? · shorthand

Stream: shorthand

Topic: Warning about name despite override?


view this post on Zulip Josh Mandel (Feb 17 2022 at 19:32):

If I create a profile like:

Profile: PatientAccessOrg-v0.0.1
Parent: Organization
Description: "Organization supporting SMART Patient Access endpoint discovery and crawling"
* ^url = "https://argonaut.fhir.us/patient-access/org"
* ^name = "PatientAccessOrg"
* ^version = "0.0.1"

... I'm a bit surprised to see the following warning:

warn  The name "PatientAccessOrg-v0.0.1" may not be suitable for machine processing applications such as code generation. Valid names start with an upper-case ASCII letter ('A'..'Z') followed by any combination of upper- or lower-case ASCII letters ('A'..'Z', and 'a'..'z'), numerals ('0'..'9') and '_', with a length limit of 255 characters.

If I understand correctly, my overriding of name should make this warning superfluous, and in an ideal world sushi would recognize this and suppress the warning? (I'm just checking my understanding here, not critiquing sushi's output -- I recognize this is a weird example and probably an edge case, and that I can ignore it or avoid it with an ID like PatientAccessOrgv001)

view this post on Zulip Chris Moesel (Feb 17 2022 at 19:36):

Yeah, ideally SUSHI would recognize that you're overriding ^name later. But this would be kind of a weird thing to do anyway, because the bit after the Profile: is actually name. And if you want a different id, then you can use Id:. E.g., the recommended way to do the above would be:

Profile: PatientAccessOrg
Id: PatientAccessOrg-v0.0.1
Parent: Organization
Description: "Organization supporting SMART Patient Access endpoint discovery and crawling"
* ^url = "https://argonaut.fhir.us/patient-access/org"
* ^version = "0.0.1"

view this post on Zulip Josh Mandel (Feb 17 2022 at 19:38):

Ah, but this breaks when I get to the next one:

Profile: PatientAccessOrg
Id: PatientAccessOrg-v0.0.1


Profile: PatientAccessOrg
Id: PatientAccessOrg-v1.0.1

gets me

error Skipping Profile: a Profile named PatientAccessOrg already exists.

view this post on Zulip Josh Mandel (Feb 17 2022 at 19:39):

So there's a unique name requirement in addition to a unique id requirement at the FSH level, even though the names can be non-unique at the StructureDefinition level.

view this post on Zulip Josh Mandel (Feb 17 2022 at 19:39):

(Sorry, I know I'm just kind of stumbling around here as I explore -- really appreciate the helpful suggestions and your knack for inferring what I actually want to know vs what I'm asking about, Chris ;-))

view this post on Zulip Chris Moesel (Feb 17 2022 at 19:40):

Oh, yeah, OK. SUSHI also uses the name as a handle, so it wants it to be unique. So you're right. In that case you would need to do something like this if you want multiple versions with the same name:

Profile: PatientAccessOrgV001
Id: PatientAccessOrg-v0.0.1
* ^name = "PatientAccessOrg"

Profile: PatientAccessOrgV101
Id: PatientAccessOrg-v1.0.1
* ^name = "PatientAccessOrg"

view this post on Zulip Josh Mandel (Feb 17 2022 at 19:41):

Cool. I'll take the warnings as a fair price to pay for unambiguous mappings from version->profile name (in the case of, say, v10.0 and v1.0.0 both looking like V100 after lossy transform)

view this post on Zulip Chris Moesel (Feb 17 2022 at 19:42):

And if SUSHI were smart enough to not warn you about names that you override, then you _could_ do it the way you originally suggested (w/ Profile: PatientAccessOrg-v0.0.1 and omitting the Id:). I'll file a bug on SUSHI to see if we can get it to look ahead and see if name is overridden in a rule.

view this post on Zulip Josh Mandel (Feb 17 2022 at 19:42):

Thanks. I'm not at all convinced that trying to publish multiple versions of a profile in a single project is useful; I'm just poking around.

view this post on Zulip Chris Moesel (Feb 17 2022 at 19:43):

Josh Mandel said:

Cool. I'll take the warnings as a fair price to pay for unambiguous mappings from version->profile name (in the case of, say, v10.0 and v1.0.0 both looking like V100 after lossy transform)

Well... I suppose you could do this, even though it is a bit ugly:

Profile: PatientAccessOrgV0_0_1
Id: PatientAccessOrg-v0.0.1
* ^name = "PatientAccessOrg"

Profile: PatientAccessOrgV1_0_1
Id: PatientAccessOrg-v1.0.1
* ^name = "PatientAccessOrg"

view this post on Zulip Chris Moesel (Feb 17 2022 at 19:45):

Or you can use sushi-ignoreWarnings.txt to suppress those warnings from SUSHI. It allows regular expressions, so you wouldn't need to individually suppress every message (like you do in IGP's ignoreWarnings file).

view this post on Zulip Chris Moesel (Feb 17 2022 at 20:01):

SUSHI#1024 *(BTW - congrats on getting an awesome issue number).

view this post on Zulip Josh Mandel (Feb 17 2022 at 20:52):

Thanks! *(And wow, thanks!)


Last updated: Apr 12 2022 at 19:14 UTC