FHIR Chat · Error with constrained data type · IG creation

Stream: IG creation

Topic: Error with constrained data type


view this post on Zulip Jose Costa Teixeira (Jan 20 2020 at 07:01):

I'm getting a

The profile https://www.ehealth.fgov.be/standards/fhir/StructureDefinition/string320 has type string320 which is not consistent with the stated type string

view this post on Zulip Jose Costa Teixeira (Jan 20 2020 at 07:01):

where should I start looking to figure this out?

view this post on Zulip Jose Costa Teixeira (Jan 20 2020 at 07:04):

my profile's differential has

    <element id="Communication.payload.content[x]">
      <path value="Communication.payload.content[x]" />
      <short value="Communication content" />
      <definition value="A communicated content (or for multi-part communications, one portion of the communication). This can be a string, an attachment, or a reference to a resource." />
      <type>
        <code value="string" />
        <profile value="https://www.ehealth.fgov.be/standards/fhir/StructureDefinition/string320" />
      </type>
      <type>
        <code value="Attachment" />
      </type>
      <type>
        <code value="Reference" />
      </type>
    </element>

view this post on Zulip Jose Costa Teixeira (Jan 20 2020 at 07:05):

(the www.ehealth.fgov.be... urls do not exist yet, in case that is relevant)

view this post on Zulip Sarah Gaunt (Jan 20 2020 at 07:19):

I think pointing to the profile is wrong? Should just be:

    <type>
        <code value="string" />
      </type>

view this post on Zulip Grahame Grieve (Jan 20 2020 at 07:20):

I think it's right. what's the definition of the string320?

view this post on Zulip Jose Costa Teixeira (Jan 20 2020 at 07:21):

<?xml version="1.0" encoding="UTF-8"?>

<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="string320"/>
  <url value="https://www.ehealth.fgov.be/standards/fhir/StructureDefinition/string320"/>
  <version value="4.0.1"/>
  <name value="String320"/>
  <status value="active"/>
  <date value="2019-10-21T20:31:33+00:00"/>
  <publisher value="HL7 BE"/>
  <description value="String with up to 320 characters"/>
  <fhirVersion value="4.0.1"/>
  <kind value="primitive-type"/>
  <abstract value="false"/>
  <type value="string320"/>
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/string"/>
  <derivation value="constraint"/>
  <snapshot>
    <element id="string320">
      <path value="string320"/>
      <short value="String 320 characters"/>
      <definition value="A string limited to 320 characters"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="string320" />
        <min value="0" />
        <max value="*" />
      </base>
    </element>
    <element id="string320.value">
      <path value="string320.value"/>
      <representation value="xmlAttr"/>
      <short value="Primitive value for string320"/>
      <definition value="Primitive value for string320"/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="string320.value" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <extension url="http://hl7.org/fhir/StructureDefinition/regex">
          <valueString value="[ \r\n\t\S]+"/>
        </extension>
        <code value="string"/>
      </type>
      <maxLength value="320"/>
    </element>
  </snapshot>
</StructureDefinition>

view this post on Zulip Grahame Grieve (Jan 20 2020 at 07:21):

type should be string, not string320

view this post on Zulip Grahame Grieve (Jan 20 2020 at 07:21):

you should actually get a warning about that somewhere.

view this post on Zulip Sarah Gaunt (Jan 20 2020 at 07:22):

Cool - I didn't even know you could create a structureDefintion with a base of a datatype... I guess it makes sense when I think about it.

view this post on Zulip Jose Costa Teixeira (Jan 20 2020 at 07:33):

thanks, it works now.


Last updated: Apr 12 2022 at 19:14 UTC