PackagesCanonicalsLogsProblems
    Packages
    silth.fhir.th.mophpc1@0.1.1
    https://fhir-ig.sil-th.org/th/mophpc1/StructureDefinition/mophpc-relatedperson-base
description: บุคคลที่เกี่ยวข้องกับผู้ป่วย/ผู้รับบริการสุขภาพ
package_name: silth.fhir.th.mophpc1
derivation: constraint
name: MophPcRelatedPersonBase
type: RelatedPerson
elements:
  identifier:
    mustSupport: true
    index: 0
    slicing:
      rules: open
      discriminator:
      - {path: type, type: pattern}
      min: null
      slices:
        cid:
          match:
            type:
              coding:
              - {code: cid, system: 'https://terms.sil-th.org/core/CodeSystem/cs-th-identifier-type'}
          schema:
            short: เลขที่บัตรประชาชน
            mustSupport: true
            index: 1
            elements:
              type:
                binding: {strength: extensible, valueSet: 'https://terms.sil-th.org/core/ValueSet/vs-th-identifier-type'}
                pattern:
                  type: CodeableConcept
                  value:
                    coding:
                    - {code: cid, system: 'https://terms.sil-th.org/core/CodeSystem/cs-th-identifier-type'}
                index: 2
              system:
                pattern: {type: Uri, value: 'https://terms.sil-th.org/id/th-cid'}
                index: 3
              value:
                constraint:
                  CID-length: {human: เลขประจำตัวประชาชน (CID) ควรมีความยาว 13 หลัก, source: 'https://fhir-ig.sil-th.org/th/mophpc1/StructureDefinition/mophpc-relatedperson-base', severity: warning, expression: 'value.matches(''^([0-9]{13})$'')'}
                index: 4
            required: [value, type, system]
        passportNo:
          match:
            type:
              coding:
              - {code: PPN, system: 'http://terminology.hl7.org/CodeSystem/v2-0203'}
          schema:
            short: เลขที่ passport กรณีที่เป็นประชากรต่างด้าวที่มีเลขที่ passport
            mustSupport: true
            array: true
            index: 5
            elements:
              type:
                binding: {strength: extensible, valueSet: 'http://hl7.org/fhir/ValueSet/identifier-type'}
                pattern:
                  type: CodeableConcept
                  value:
                    coding:
                    - {code: PPN, system: 'http://terminology.hl7.org/CodeSystem/v2-0203'}
                index: 6
              system:
                constraint:
                  Passport-uri: {human: 'หมายเลขหนังสือเดินทาง (Passport) ควรมี system URL ในรูปแบบ http://hl7.org/fhir/sid/passport-{XXX} โดยที่ {XXX} คือรหัสประเทศ 3 หลักซึ่งออกโดย ISO 3166', source: 'https://fhir-ig.sil-th.org/th/mophpc1/StructureDefinition/mophpc-relatedperson-base', severity: warning, expression: 'value.matches(''^(http://hl7.org/fhir/sid/passport-[A-Z]{3})$'')'}
                index: 7
              value: {index: 8}
            required: [value, type, system]
  patient:
    type: Reference
    mustSupport: true
    refers: ['https://fhir-ig.sil-th.org/th/mophpc1/StructureDefinition/mophpc-patient-base']
    index: 9
  relationship: {mustSupport: true, index: 10}
  name:
    short: ชื่อ-นามกสุล
    mustSupport: true
    index: 11
    elements:
      prefix:
        extensions:
          prefixCode: {url: 'https://fhir-ig.sil-th.org/th/extensions/StructureDefinition/ex-humanname-name-prefix', min: 0, max: 1, type: Extension, short: รหัสคำนำหน้าชื่อ, index: 13}
        elements:
          extension:
            index: 12
            slicing:
              rules: open
              ordered: false
              discriminator:
              - {path: url, type: value}
              min: null
              slices:
                prefixCode:
                  match: {url: null}
                  schema: {type: Extension, short: รหัสคำนำหน้าชื่อ, url: 'https://fhir-ig.sil-th.org/th/extensions/StructureDefinition/ex-humanname-name-prefix', index: 13}
                  min: 0
                  max: 1
    slicing:
      rules: open
      discriminator:
      - {path: 'extension(''http://hl7.org/fhir/StructureDefinition/language'').value', type: value}
      min: null
      slices:
        thai:
          match:
            extension('http://hl7:
              org/fhir/StructureDefinition/language'): {value: null}
          schema:
            short: ชื่อ-นามสกุล ภาษาไทย
            mustSupport: true
            array: true
            index: 14
            extensions:
              language:
                url: http://hl7.org/fhir/StructureDefinition/language
                type: Extension
                mustSupport: true
                index: 16
                elements:
                  value:
                    pattern: {type: Code, value: th}
                    choices: []
                    index: 18
            elements:
              extension:
                index: 15
                slicing:
                  slices:
                    language:
                      match: {}
                      schema:
                        type: Extension
                        mustSupport: true
                        url: http://hl7.org/fhir/StructureDefinition/language
                        index: 16
                        elements:
                          value:
                            pattern: {type: Code, value: th}
                            choices: []
                            index: 18
              family: {short: นามสกุล ภาษาไทย, mustSupport: true, index: 19}
              given: {short: ชื่อ ภาษาไทย, mustSupport: true, index: 20}
              prefix:
                short: คำนำหน้า ภาษาไทย
                mustSupport: true
                index: 21
                extensions:
                  prefixCode: {url: 'https://fhir-ig.sil-th.org/th/extensions/StructureDefinition/ex-humanname-name-prefix', min: 0, max: 1, type: Extension, short: รหัสคำนำหน้าชื่อ, index: 22}
                elements:
                  extension:
                    type: Extension
                    short: รหัสคำนำหน้าชื่อ
                    url: https://fhir-ig.sil-th.org/th/extensions/StructureDefinition/ex-humanname-name-prefix
                    index: 22
                    slicing:
                      slices:
                        prefixCode:
                          match: {}
                          schema: {type: Extension, short: รหัสคำนำหน้าชื่อ, url: 'https://fhir-ig.sil-th.org/th/extensions/StructureDefinition/ex-humanname-name-prefix', index: 22}
                          min: 0
                          max: 1
            required: [extension]
        english:
          match:
            extension('http://hl7:
              org/fhir/StructureDefinition/language'): {value: null}
          schema:
            short: ชื่อ-นามสกุล ภาษาอังกฤษ (ถ้ามี)
            mustSupport: true
            array: true
            index: 23
            extensions:
              language:
                url: http://hl7.org/fhir/StructureDefinition/language
                type: Extension
                index: 25
                elements:
                  value:
                    pattern: {type: Code, value: en}
                    choices: []
                    index: 27
            elements:
              extension:
                index: 24
                slicing:
                  slices:
                    language:
                      match: {}
                      schema:
                        type: Extension
                        url: http://hl7.org/fhir/StructureDefinition/language
                        index: 25
                        elements:
                          value:
                            pattern: {type: Code, value: en}
                            choices: []
                            index: 27
              family: {short: นามสกุล ภาษาอังกฤษ, mustSupport: true, index: 28}
              given: {short: ชื่อ ภาษาอังกฤษ, mustSupport: true, index: 29}
              prefix:
                short: คำนำหน้า ภาษาอังกฤษ
                mustSupport: true
                index: 30
                extensions:
                  prefixCode: {url: 'https://fhir-ig.sil-th.org/th/extensions/StructureDefinition/ex-humanname-name-prefix', min: 0, max: 1, type: Extension, short: รหัสคำนำหน้าชื่อ, index: 31}
                elements:
                  extension:
                    type: Extension
                    short: รหัสคำนำหน้าชื่อ
                    url: https://fhir-ig.sil-th.org/th/extensions/StructureDefinition/ex-humanname-name-prefix
                    index: 31
                    slicing:
                      slices:
                        prefixCode:
                          match: {}
                          schema: {type: Extension, short: รหัสคำนำหน้าชื่อ, url: 'https://fhir-ig.sil-th.org/th/extensions/StructureDefinition/ex-humanname-name-prefix', index: 31}
                          min: 0
                          max: 1
            required: [extension]
  telecom:
    mustSupport: true
    index: 32
    slicing:
      rules: open
      discriminator:
      - {path: system, type: value}
      min: null
      slices:
        phone:
          match: {system: phone}
          schema:
            short: เบอร์โทรศัพท์ที่ใช้ในการติดต่อ
            mustSupport: true
            array: true
            index: 33
            elements:
              system:
                pattern: {type: Code, value: phone}
                index: 34
            required: [system]
package_version: 0.1.1
class: profile
kind: resource
url: https://fhir-ig.sil-th.org/th/mophpc1/StructureDefinition/mophpc-relatedperson-base
base: http://hl7.org/fhir/StructureDefinition/RelatedPerson
version: 0.1.1
required: [relationship]