PackagesCanonicalsLogsProblems
    Packages
    silth.fhir.th.claimcon@0.1.2
    https://fhir-ig.sil-th.org/th/claimcon/StructureDefinition/claimcon-patient-base
description: ผู้ป่วย/ผู้รับบริการสุขภาพ
package_name: silth.fhir.th.claimcon
derivation: constraint
name: ClaimConPatientBase
type: Patient
elements:
  extension:
    index: 0
    slicing:
      rules: open
      ordered: false
      discriminator:
      - {path: url, type: value}
      min: null
      slices:
        nationality:
          match: {url: null}
          schema: {type: Extension, short: สัญชาติของผู้ป่วย, mustSupport: true, url: 'https://fhir-ig.sil-th.org/th/extensions/StructureDefinition/ex-th-patient-nationality', index: 1}
          min: 0
  identifier:
    mustSupport: true
    index: 2
    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: 3
            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: 4
              system:
                pattern: {type: Uri, value: 'https://terms.sil-th.org/id/th-cid'}
                index: 5
              value:
                constraint:
                  CID-length: {human: เลขประจำตัวประชาชน (CID) ควรมีความยาว 13 หลัก, source: 'https://fhir-ig.sil-th.org/th/claimcon/StructureDefinition/claimcon-patient-base', severity: warning, expression: 'value.matches(''^([0-9]{13})$'')'}
                mustSupport: true
                index: 6
            required: [type]
        hn:
          match:
            type:
              coding:
              - {code: localHn, system: 'https://terms.sil-th.org/core/CodeSystem/cs-th-identifier-type'}
          schema:
            short: เลขประจำตัวผู้ป่วย (HN)
            mustSupport: true
            index: 7
            elements:
              type:
                binding: {strength: extensible, valueSet: 'https://terms.sil-th.org/core/ValueSet/vs-th-identifier-type'}
                pattern:
                  type: CodeableConcept
                  value:
                    coding:
                    - {code: localHn, system: 'https://terms.sil-th.org/core/CodeSystem/cs-th-identifier-type'}
                index: 8
              system:
                constraint:
                  HN-uri: {human: 'เลขประจำตัวผู้ป่วย (HN) ควรมี system URL ในรูปแบบ https://terms.sil-th.org/hcode/5/{XXXXX}/HN หรือ https://terms.sil-th.org/hcode/9/{XXXXX}/HN โดยที่ {XXXXX} คือรหัส HCODE 5 หลัก หรือ 9 หลัก ซึ่งออกโดยกยผ.', source: 'https://fhir-ig.sil-th.org/th/claimcon/StructureDefinition/claimcon-patient-base', severity: warning, expression: 'value.matches(''^(https://terms.sil-th.org/hcode/5/[0-9]{5}/HN)$'') or value.matches(''^(https://terms.sil-th.org/hcode/9/[0-9]{9}/HN)$'')'}
                index: 9
              value: {mustSupport: true, index: 10}
            required: [type]
        passportNo:
          match:
            type:
              coding:
              - {code: PPN, system: 'http://terminology.hl7.org/CodeSystem/v2-0203'}
          schema:
            short: เลขที่ passport กรณีที่เป็นประชากรต่างด้าวที่มีเลขที่ passport
            index: 11
            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: 12
              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/claimcon/StructureDefinition/claimcon-patient-base', severity: warning, expression: 'value.matches(''^(http://hl7.org/fhir/sid/passport-[A-Z]{3})$'')'}
                index: 13
              value: {mustSupport: true, index: 14}
            required: [type]
  name:
    short: ชื่อ-นามกสุล
    mustSupport: true
    index: 15
    elements:
      family: {short: นามสกุล ภาษาไทย, mustSupport: true, index: 16}
      given: {short: ชื่อ ภาษาไทย, mustSupport: true, index: 17}
      prefix: {mustSupport: true, index: 18}
  gender: {short: เพศ, mustSupport: true, index: 19}
  birthDate: {short: วันเกิด, mustSupport: true, index: 20}
  address:
    mustSupport: true
    index: 21
    extensions:
      addressCode: {url: 'https://fhir-ig.sil-th.org/th/extensions/StructureDefinition/ex-address-address-code', min: 0, max: 1, type: Extension, short: รหัสที่อยู่ ตามกรมการปกครอง, mustSupport: true, index: 22}
      structuredLine: {url: 'https://fhir-ig.sil-th.org/th/extensions/StructureDefinition/ex-address-structured-line', min: 0, max: 1, type: Extension, mustSupport: true, index: 23}
    elements:
      extension:
        type: Extension
        short: รหัสที่อยู่ ตามกรมการปกครอง
        mustSupport: true
        url: https://fhir-ig.sil-th.org/th/extensions/StructureDefinition/ex-address-address-code
        index: 22
        slicing:
          slices:
            addressCode:
              match: {}
              schema: {type: Extension, short: รหัสที่อยู่ ตามกรมการปกครอง, mustSupport: true, url: 'https://fhir-ig.sil-th.org/th/extensions/StructureDefinition/ex-address-address-code', index: 22}
              min: 0
              max: 1
            structuredLine:
              match: {}
              schema: {type: Extension, mustSupport: true, url: 'https://fhir-ig.sil-th.org/th/extensions/StructureDefinition/ex-address-structured-line', index: 23}
              min: 0
              max: 1
      district: {short: อำเภอ, mustSupport: true, index: 24}
      state: {short: จังหวัด, mustSupport: true, index: 25}
  maritalStatus:
    short: สถานะสมรส
    mustSupport: true
    index: 26
    elements:
      coding:
        index: 27
        slicing:
          rules: open
          discriminator:
          - {path: system, type: value}
          min: null
          slices:
            hl7:
              match: {system: null}
              schema:
                binding: {strength: extensible, valueSet: 'http://hl7.org/fhir/ValueSet/marital-status'}
                mustSupport: true
                index: 28
              min: 0
              max: 1
            chi:
              match: {system: null}
              schema:
                binding: {strength: extensible, valueSet: 'https://terms.sil-th.org/core/ValueSet/vs-chi-patient-marital'}
                mustSupport: true
                index: 29
              min: 0
              max: 1
            eclaim:
              match: {system: null}
              schema:
                binding: {strength: extensible, valueSet: 'https://terms.sil-th.org/core/ValueSet/vs-thcc-marital'}
                mustSupport: true
                index: 30
              min: 0
              max: 1
package_version: 0.1.2
extensions:
  nationality: {url: 'https://fhir-ig.sil-th.org/th/extensions/StructureDefinition/ex-th-patient-nationality', min: 0, type: Extension, short: สัญชาติของผู้ป่วย, mustSupport: true, index: 1}
class: profile
kind: resource
url: https://fhir-ig.sil-th.org/th/claimcon/StructureDefinition/claimcon-patient-base
base: http://hl7.org/fhir/StructureDefinition/Patient
version: 0.1.2