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

ValueSet rendering differs depending on the meta.profile value #1008

Open
Rosnyni opened this issue Dec 16, 2024 · 2 comments
Open

ValueSet rendering differs depending on the meta.profile value #1008

Rosnyni opened this issue Dec 16, 2024 · 2 comments
Labels
Approved Change has been reviewed and accepted and can now be applied to the templates enhancement New feature or request

Comments

@Rosnyni
Copy link

Rosnyni commented Dec 16, 2024

I have a dedicated profile for ValueSet, which have for only purpose to change description/title of the SDCValueSet profile :

Profile: CoreValueSet
Parent: SDCValueSet
Title: "profil AP-HP pour les ValueSet"
Description: "Profile of the ValueSet resource for AP-HP | Profil de la ressource ValueSet pour l'usage à l'AP-HP."

And I have a simple valueSet, as follow :

ValueSet: APHPCoreValueSetPractitionerRoleCode
Id: aphp-core-practitioner-role-code-vs
Title: "Codes pour typer les practitionerRole"
Description: "Codes pour typer les practitionerRole au sein de l'EDS."

* ^meta.profile[+] = "https://aphp.fr/ig/fhir/core/StructureDefinition/CoreValueSet"

* ^experimental = false
* ^status = #active
* ^immutable = false
* include codes from system APHPCoreCodeSystemPractitionerRoleCode

when I build the IG, valueSet with * ^meta.profile[+] = "(https://aphp.fr/ig/fhir/core/StructureDefinition/CoreValueSet)" are rendered like this :

image

With * ^meta.profile[+] = "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-valueset" or without any profile, I have a dedicated section for expansion:

image

Is this normal ?

@lmckenzi
Copy link
Contributor

What's happening here is that because you're declaring a meta.profile in your instance that points to a profile that's defined in the same IG, the publisher is automatically presuming that your ValueSet is an example rather than a proper ValueSet definition and it's therefore being rendered accordingly. As a short-term workaround, you can list your ValueSets (or at least the ones that declare a meta.profile that points to a profile in your IG) as 'resources' in your sushi-config.yaml and declare exampleBoolean: false. This will prevent the inference from happening.

In the longer term, we'll:
a) define an IG parameter that causes the example-inference by metadata to be turned off for the IG
b) spit out a QA information message that indicates that an instance has been inferred to be an example based on the meta.profile declaration so it's less likely this will happen unnoticed by accident in the future. (Using meta.profile to assert that something is an example is not a good practice and is something most authors should stop doing.)

@lmckenzi lmckenzi added enhancement New feature or request Approved Change has been reviewed and accepted and can now be applied to the templates labels Dec 17, 2024
@lmckenzi lmckenzi moved this from Inbox to To do in IG Publisher issue board Dec 17, 2024
@Rosnyni
Copy link
Author

Rosnyni commented Dec 19, 2024

Thank you for your response and the solution you provide.

For the short term workaround however :

I have checked the property "exampleBoolean" in the output ImplementationGuide (either json, ttl or xml), and it is already set at "false" in the IG with the not expanded rendering.

I have added the following section in the sushi-config.yaml of my IG

resources:
  ValueSet/aphp-core-practitioner-role-code-vs:
    exampleBoolean: false

But I now have the following QA warning:

The resource ValueSet/aphp-core-practitioner-role-code-vs should have an OID assigned to cater for possible use with OID based terminology systems e.g. CDA usage (OIDs are easy to assign - see https://build.fhir.org/ig/FHIR/fhir-tools-ig/CodeSystem-ig-parameters.html#ig-parameters-auto-oid-root)

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved Change has been reviewed and accepted and can now be applied to the templates enhancement New feature or request
Projects
Development

No branches or pull requests

2 participants