Stream: implementers
Topic: Creating a new profile for "Location" fails
Jens Salecker (Jan 17 2020 at 08:41):
A profile has been created with Forge. Among other things, the Location.physicalType should only allow codes from the valueSet "Physical form of the location"(http://hl7.org/fhir/ValueSet/location-physical-type). To do this, only the "Strength" property has been changed from "example" to "required" in the ValueSet binding. The result can be validated on SIMPLIFIER - No Issues. However, under Details, "Location.physicalType" appears "Binding" (unbound)(required).
Problem:
The created StructureDefinition cannot be uploaded to the public VONK. Error: "Instance failed constraint eld-10"provide either a reference or a description (or both)""valueSet.exists() or description.exists()". Apparently a reference to the value set is needed here. The manual entry of a reference e.g.:
<binding>-strength value="required"/> <valueSetReference>-reference value="http://hl7.org/fhir/ValueSet/location-physical-type" /></valueSetReference></binding>
allows uploading to the public VONK, but also results in an error on SIMPLIFIER."Exception: "Internal logic failure: Type checking the data: Encountered unknown element 'valueSetReference' at location 'StructureDefinition.differential[0].element[4].binding[0].valueSetReference[0]' while parsing"
It should also be mentioned that even after successfully uploading the StructureDefinition to the public VONK, the sample resources cannot be validated against the profile:
GET https://vonk.fire.ly/Location/$validate?profile=http://www.smith.care/fhir/StructureDefinition/HELP_Location
Error Code: incomplete
Error Text: "Unable to resolve reference to profile 'http://www.smith.care/fhir/StructureDefinition/HELP_Location'"
Has anybody any hint how to define the StructureDefinition in a way so that it is required to enter a code of the ValueSet location-physical-type?
(the StructureDefintion of the new Location profile is attached) HELP_Location.StructureDefinition_draft.xml
Ardon Toonstra (Jan 17 2020 at 14:40):
Hi @Jens Salecker ,
Your profile looks ok! Only adjusting the binding strength in a differential if you don't change the value set is ok.
It is R4 and it validates against R4: https://simplifier.net/validate?fhirVersion=R4&scope=simplifier.core.r4~4.0.1&snippetFileId=741
Ardon Toonstra (Jan 17 2020 at 14:41):
The public Vonk server can handle STU3 and R4 at the same base. Be default this is STU3. If you add "fhirVersion=4.0" to the accept header, Vonk will create your profile without complaining.
Ardon Toonstra (Jan 17 2020 at 14:43):
If you POST or PUT your profile to the StructureDefinition endpoint, Vonk will store it as any other resource. If you would like to use this for validation purposes, you will need to POST/PUT it to the administration endpoint. More info here: http://docs.simplifier.net/vonk/administration_api.html
Ardon Toonstra (Jan 17 2020 at 14:46):
You could also spin up your own Vonk server using a free community license and have a lot of other options on getting your profiles in the administration API - for example with a link to your Simplifier project. More info in the docs as well.
Last updated: Apr 12 2022 at 19:14 UTC