Open JohnMoehrke opened 11 months ago
would also be nice if the IG publisher striped these out, as they are just there to inform the IG publisher.
Possible that there was an extension like this for the title, that was removed? https://github.com/HL7/fhir-ig-publisher/commit/27cfd47e10585d0b3ceb1a03fe3f80341f6c2612
there are these already and I strip them out using a bash script and I think Sushi strips them as well.
resourceType: MedicationRequest
id: coded-oral-axid-with-compliance
meta:
profile:
- http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest
extension:
- url: http://hl7.org/fhir/StructureDefinition/instance-name #<<<<<<<<<<<<<<HERE
valueString: MedicationRequest Coded Oral Axid with Compliance Extension Example
- url: http://hl7.org/fhir/StructureDefinition/instance-description #<<<<<<<<<<<<<<<<<<HERE
valueMarkdown: This example demonstrates medication adherence for a prescribed medication example using an extension on the MedicationRequest. The extension value uses SNOMED CT.
#....
https://hl7.org/fhir/extensions/StructureDefinition-resource-instance-name.html
https://hl7.org/fhir/extensions/StructureDefinition-resource-instance-description.html
are in the latest extensions pack... not sure what happened to the ones I am currently using, but they work with sushi to load the title and descriptions into the ig resource so you don't have to
We will update the IG publisher to propagate the artifact-title and artifact-description into ImplementationGuide.definition.resource.name/description if they exist (and there aren't core title/description elements). However, unlike resource-instance-name and resource-instance-description, these extensions will not get stripped out of the original resources as part of the publication process. Will ask Sushi to follow this same behavior. The "instance-name" and "instance-description" extensions aren't defined and shouldn't be used.
NOTE: resource-instance-description doesn't seem to be working right now.
NOTE: resource-instance-description doesn't seem to be working right now.
Does the same apply to resource-instance-name, or does that work for you?
On this resource:
<?xml version="1.0" encoding="UTF-8"?>
<Patient xmlns="http://hl7.org/fhir">
<id value="1"/>
<extension url="http://hl7.org/fhir/StructureDefinition/resource-instance-name">
<valueString value="Name for patient introduced through extension"/>
</extension>
<name>
<text value="Name As Text"/>
<family value="FamName"/>
<given value="GivenName"/>
</name>
</Patient>
I get the error for it from the IG publisher:
Unable to find ImplementationGuide.definition.resource.name for the resource Patient/1. Name is mandatory if it cannot be inferred from the resource to allow proper population of the artifact list.
resource-instance-name did work as expected.
I get an error from the IG Publisher validation
Value is 'http://hl7.org/fhir/StructureDefinition/resource-instance-description' but must be 'http://hl7.org/fhir/StructureDefinition/resource-instance-name'
that led me to looking at the extension.
https://hl7.org/fhir/extensions/StructureDefinition-resource-instance-description.html
The extension definition has a bug in it that the Extension.url / fixedUri is wrong. It is set to the http://hl7.org/fhir/StructureDefinition/resource-instance-name
I have added all three pairs of extensions to a test IG https://build.fhir.org/ig/JohnMoehrke/testMed/branches/main/DocumentReference-1234.html
I have added all three pairs of extensions to a test IG https://build.fhir.org/ig/JohnMoehrke/testMed/branches/main/DocumentReference-1234.html
In this example, SUSHI adds the resource declaration to the ImplementationGuide resource, with name value from the extension. Is that right? So the extension only works if the IG uses SUSHI. Than can explain why the same extension doesn't work for me, since my IG doesn't have FSH.
See an example IG here: https://build.fhir.org/ig/adamzkover/testIgNameExtensions/qa.html
For artifacts that don't have IG defined title and description; use the extension artifact-title and artifact-description.
In my case I have preprocessing scripts that convert old data into FHIR resources. I can inline artifact-title and artifact-description easily; where as populating the IG is harder.