PackagesCanonicalsLogsProblems
    Packages
    se.electronichealth.fhir.nll.r4@1.0.1-alpha
    http://electronichealth.se/fhir/StructureDefinition/NLLRelatedPerson
description: Information about a person that is related to a patient. Used in NLL primarily to represent the guardian of a child.
package_name: se.electronichealth.fhir.nll.r4
derivation: constraint
name: NLLRelatedPerson
type: RelatedPerson
elements:
  id: {mustSupport: true, index: 0}
  identifier:
    mustSupport: true
    index: 1
    slicing:
      rules: open
      discriminator:
      - {path: system, type: value}
      min: null
      slices:
        pnr:
          match: {system: 'http://electronichealth.se/identifier/personnummer'}
          schema:
            short: Identifier of related person
            mustSupport: true
            index: 2
            elements:
              system:
                pattern: {type: Uri, value: 'http://electronichealth.se/identifier/personnummer'}
                mustSupport: true
                index: 3
              value:
                short: The value, swedish national identification number
                constraint:
                  swe-id-rule: {human: Personal id must have 12 digits, source: RelatedPerson, severity: error, expression: '$this.matches(''^\\d{12}$'')'}
                mustSupport: true
                index: 4
            required: [value, system]
  patient:
    type: Reference
    mustSupport: true
    refers: ['http://electronichealth.se/fhir/StructureDefinition/NLLPatient']
    index: 5
  relationship:
    binding: {strength: required, valueSet: 'http://electronichealth.se/fhir/ValueSet/relationship-types'}
    mustSupport: true
    pattern:
      type: CodeableConcept
      value:
        coding:
        - {code: GUARD, system: 'http://terminology.hl7.org/CodeSystem/v3-RoleCode'}
    index: 6
    elements:
      coding:
        mustSupport: true
        index: 7
        elements:
          system: {mustSupport: true, index: 8}
          code: {mustSupport: true, index: 9}
        required: [system, code]
    required: [coding]
package_version: 1.0.1-alpha
class: profile
kind: resource
url: http://electronichealth.se/fhir/StructureDefinition/NLLRelatedPerson
base: http://hl7.org/fhir/StructureDefinition/RelatedPerson
version: 1.0.0
required: [relationship]