Stream: shorthand
Topic: constraining datatype
David Hay (Mar 08 2020 at 21:59):
I have an FSH file as follows:
Extension: NzEthnicity Id: nzEthnicity Description: "The ethnicity of the patient. One to six level 4 codes." //These files were generated by a script from a model at NzNHIPatient.ethnicity * extension 0..0 * value[x] only CodeableConcept * valueCodeableConcept from http://standards.digital.health.nz/valueset/ethnic-group-level-4 (preferred)
But when the IG is built, the snapshot shows all data types for value[x]. What am I doing wrong?
Interestingly, other definitions like the one below seem to work OK:
Extension: Registration_status Id: registration-status Description: "An indicator of the practicing status of the practitioner as supplied by their Responsible Authority or professional body." //These files were generated by a script from a model at HpiPractitioner.qualification.status * extension 0..0 * value[x] only CodeableConcept * valueCodeableConcept from http://standards.digital.health.nz/fhir/ValueSet/registration-status (preferred)
Nick Freiter (Mar 09 2020 at 11:36):
I wasn't able to reproduce this using the FSH in the first snippet. The StructureDefinition generated by SUSHI had value[x]
constrained to only CodeableConcept
. When you say "when the IG is built" do you mean after using the IG Publisher on the output of SUSHI? Is it possible SUSHI may have produced the correct output and something went wrong in the IG building process? Or is it possible there were FSH errors not shown here that may have stopped SUSHI from building?
It seems like that snippet of FSH is working fine, let me know if you can reproduce the issue with just that snippet, or we can try reproducing using your whole set of FSH files.
Last updated: Apr 12 2022 at 19:14 UTC