<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="gd-parental" />
  <url value="http://ehelse.no/fhir/StructureDefinition/gd-parental" />
  <version value="2.0.2" />
  <name value="GdParental" />
  <status value="draft" />
  <date value="2019-10-16" />
  <description value="Extension for representing information regarding parental responsibility parent-child/child-parent. Represents the same information awailable in the Norwegian Folkeregister." />
  <fhirVersion value="4.0.0" />
  <kind value="complex-type" />
  <abstract value="false" />
  <context>
    <type value="element" />
    <expression value="RelatedPerson" />
  </context>
  <context>
    <type value="element" />
    <expression value="RelatedPerson.relationship" />
  </context>
  <type value="Extension" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension" />
  <derivation value="constraint" />
  <differential>
    <element id="Extension">
      <path value="Extension" />
      <short value="Foreldreansvar" />
      <definition value="Extension for representing information regarding parental responsibility parent-child/child-parent. Represents the same information awailable in the Norwegian Folkeregister.&#xD;&#xA;&#xD;&#xA;The information from FREG contains both the identifier of the responsibleParty and the identifier of the subjectOfResponsibility. If either the subject or the responsible party is not a norwegian citizen registered in FREG the elements: responsiblePartyNoId or subjectOfResponsibilityNoId (contains the name of the party/subject) is used.&#xD;&#xA;&#xD;&#xA;If the responsible party is an Organization, responsibleOrganization (identifier from enhetsregisteret) is used." />
      <alias value="foreldreansvar" />
      <max value="1" />
    </element>
    <element id="Extension.extension">
      <path value="Extension.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="Extension.extension:responsibleOrganization">
      <path value="Extension.extension" />
      <sliceName value="responsibleOrganization" />
      <short value="The responsible organization" />
      <definition value="Identity of the organization that has formal responsibility of the child (foreldreansvar). Identified using the organization number from enhetsregisteret." />
      <alias value="ansvarligorganisasjon" />
      <max value="1" />
      <binding>
        <strength value="required" />
        <valueSet value="urn:oid:2.16.578.1.12.4.1.2.101" />
      </binding>
    </element>
    <element id="Extension.extension:responsibleOrganization.url">
      <path value="Extension.extension.url" />
      <fixedUri value="responsibleOrganization" />
    </element>
    <element id="Extension.extension:responsibleOrganization.value[x]">
      <path value="Extension.extension.value[x]" />
      <short value="The identifier of the organization" />
      <definition value="Identifier for the organization that is used to identify the organization across multiple disparate systems." />
      <alias value="organisasjonsnummer" />
      <type>
        <code value="Identifier" />
      </type>
    </element>
    <element id="Extension.extension:responsibleOrganization.value[x].system">
      <path value="Extension.extension.value[x].system" />
      <min value="1" />
    </element>
    <element id="Extension.extension:responsibleOrganization.value[x].value">
      <path value="Extension.extension.value[x].value" />
      <min value="1" />
    </element>
    <element id="Extension.extension:subjectOfResponsibility">
      <path value="Extension.extension" />
      <sliceName value="subjectOfResponsibility" />
      <short value="The child subject of parenting responsibilty" />
      <definition value="The child that is subject of parenting responsibilty, identified by FNR or DNR of the child in question" />
      <alias value="ansvarssubjekt" />
      <max value="1" />
    </element>
    <element id="Extension.extension:subjectOfResponsibility.url">
      <path value="Extension.extension.url" />
      <fixedUri value="subjectOfResponsibility" />
    </element>
    <element id="Extension.extension:subjectOfResponsibility.value[x]">
      <path value="Extension.extension.value[x]" />
      <type>
        <code value="string" />
      </type>
    </element>
    <element id="Extension.extension:responsibleParty">
      <path value="Extension.extension" />
      <sliceName value="responsibleParty" />
      <short value="The person responsible for the child" />
      <definition value="The person holding the legal parenting responsibilty, identified by FNR or DNR of the person in question" />
      <alias value="ansvarlig" />
      <max value="1" />
    </element>
    <element id="Extension.extension:responsibleParty.url">
      <path value="Extension.extension.url" />
      <fixedUri value="responsibleParty" />
    </element>
    <element id="Extension.extension:responsibleParty.value[x]">
      <path value="Extension.extension.value[x]" />
      <type>
        <code value="string" />
      </type>
    </element>
    <element id="Extension.extension:responsiblePartyNoId">
      <path value="Extension.extension" />
      <sliceName value="responsiblePartyNoId" />
      <short value="The person responsible for the child" />
      <definition value="The person holding the legal parenting responsibilty, identified by name, gender, birthdate and nationality of the person." />
      <alias value="ansvarligUtenIdentifikator" />
      <max value="1" />
    </element>
    <element id="Extension.extension:responsiblePartyNoId.url">
      <path value="Extension.extension.url" />
      <fixedUri value="responsiblePartyNoId" />
    </element>
    <element id="Extension.extension:responsiblePartyNoId.value[x]">
      <path value="Extension.extension.value[x]" />
      <type>
        <code value="HumanName" />
        <profile value="http://hl7.no/fhir/StructureDefinition/no-basis-HumanName" />
      </type>
    </element>
    <element id="Extension.extension:subjectOfResponsibilityNoId">
      <path value="Extension.extension" />
      <sliceName value="subjectOfResponsibilityNoId" />
      <short value="The child subject of parenting responsibilty" />
      <definition value="The child that is subject of parenting responsibilty, identified by name, gender, birthdate and nationality of the person." />
      <alias value="ansvarssubjektUtenIdentifikator" />
      <max value="1" />
    </element>
    <element id="Extension.extension:subjectOfResponsibilityNoId.url">
      <path value="Extension.extension.url" />
      <fixedUri value="subjectOfResponsibilityNoId" />
    </element>
    <element id="Extension.extension:subjectOfResponsibilityNoId.value[x]">
      <path value="Extension.extension.value[x]" />
      <type>
        <code value="HumanName" />
        <profile value="http://hl7.no/fhir/StructureDefinition/no-basis-HumanName" />
      </type>
    </element>
    <element id="Extension.extension:fregMetadata">
      <path value="Extension.extension" />
      <sliceName value="fregMetadata" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://ehelse.no/fhir/StructureDefinition/gd-fregmetadata" />
      </type>
    </element>
    <element id="Extension.extension:fregMetadata.url">
      <path value="Extension.extension.url" />
      <fixedUri value="fregMetadata" />
    </element>
    <element id="Extension.url">
      <path value="Extension.url" />
      <fixedUri value="http://ehelse.no/fhir/StructureDefinition/gd-parental" />
    </element>
    <element id="Extension.value[x]">
      <path value="Extension.value[x]" />
      <max value="0" />
    </element>
  </differential>
</StructureDefinition>