PackagesCanonicalsLogsProblems
    Packages
    tw.gov.mohw.nhi.ci@1.0.0
    https://nhicore.nhi.gov.tw/ci/StructureDefinition/Patient-twci
description: 此病人資訊-Patient TWCI Profile說明TWCI IG如何進一步定義臺灣核心-病人(TW Core Patient) Profile以呈現重大傷病之病人基本資料
package_name: tw.gov.mohw.nhi.ci
derivation: constraint
name: PatientTWCI
type: Patient
elements:
  identifier:
    array: true
    max: 2
    index: 0
    slicing:
      slices:
        idCardNumber:
          match: {}
          schema:
            short: 身分證字號
            _required: true
            index: 1
            elements:
              value:
                constraint:
                  txt-10: {human: 長度不得超過10字, source: 'https://nhicore.nhi.gov.tw/ci/StructureDefinition/Patient-twci', severity: error, expression: length() <= 10}
                index: 2
        passportNumber:
          match: {}
          schema: {index: 3}
          max: 0
        residentNumber:
          match: {}
          schema: {index: 4}
          max: 0
        medicalRecord:
          match: {}
          schema: {short: 病歷號(參與醫院必須註冊命名系統)。由醫院自行填寫。, index: 5}
  name:
    constraint:
      pat-name: {human: 病人姓名有誤,超過12字, source: 'https://nhicore.nhi.gov.tw/ci/StructureDefinition/Patient-twci', severity: error, expression: text.length() <= 12}
    index: 6
    slicing:
      slices:
        official:
          match: {}
          schema: {index: 7}
          max: 0
        usual:
          match: {}
          schema:
            short: 姓名
            _required: true
            index: 8
            elements:
              text: {index: 9}
            required: [text]
        temp:
          match: {}
          schema: {index: 10}
          max: 0
        anonymous:
          match: {}
          schema: {index: 11}
          max: 0
  telecom:
    array: true
    min: 1
    max: 3
    index: 12
    slicing:
      rules: closed
      ordered: false
      discriminator:
      - {path: system, type: value}
      min: 1
      max: 3
      slices:
        mobile:
          match: {system: sms}
          schema:
            short: 手機號碼。應為數字10碼(寄送核發簡訊使用)。手機號碼與聯絡電話應至少填寫一欄。
            constraint:
              telecom-mobile: {human: 手機號碼格式有誤,應為數字10碼。, source: 'https://nhicore.nhi.gov.tw/ci/StructureDefinition/Patient-twci', severity: error, expression: value.toString().length() = 10}
            mustSupport: true
            index: 13
            elements:
              system:
                pattern: {type: code, value: sms}
                type: code
                index: 14
        contactTel:
          match: {system: phone}
          schema:
            short: 連絡電話。長度不得超過15字。手機號碼與聯絡電話應至少填寫一欄。
            constraint:
              telecom-contactTel: {human: 連絡電話格式有誤,長度不得超過15字。, source: 'https://nhicore.nhi.gov.tw/ci/StructureDefinition/Patient-twci', severity: error, expression: value.toString().length() <= 15}
            mustSupport: true
            index: 15
            elements:
              system:
                pattern: {type: code, value: phone}
                type: code
                index: 16
              value:
                constraint:
                  txt-15: {human: 長度不得超過15字, source: 'https://nhicore.nhi.gov.tw/ci/StructureDefinition/Patient-twci', severity: error, expression: length() <= 15}
                index: 17
        email:
          match: {system: email}
          schema:
            short: 電子郵件信箱
            mustSupport: true
            index: 18
            elements:
              system:
                pattern: {type: code, value: email}
                type: code
                index: 19
              value:
                constraint:
                  txt-40: {human: 長度不得超過40字, source: 'https://nhicore.nhi.gov.tw/ci/StructureDefinition/Patient-twci', severity: error, expression: length() <= 40}
                index: 20
  gender: {short: '病人性別。male:男性 | female:女性 | other:其他 | unknown:未知', index: 21}
  birthDate: {short: 出生日期,YYYY-MM-DD,西元年月日。, index: 22}
  address:
    index: 23
    elements:
      text:
        short: 連絡住址
        constraint:
          txt-80: {human: 長度不得超過80字, source: 'https://nhicore.nhi.gov.tw/ci/StructureDefinition/Patient-twci', severity: error, expression: length() <= 80}
        index: 24
      postalCode:
        index: 25
        extensions:
          PostalCode:
            url: null
            _required: true
            index: 27
            elements:
              value[x]:
                elements:
                  coding:
                    index: 28
                    slicing:
                      slices:
                        PostalCode3:
                          match: {}
                          schema:
                            _required: true
                            index: 29
                            elements:
                              code: {short: 郵遞區號, index: 30}
                        PostalCode5:
                          match: {}
                          schema: {index: 31}
                          max: 0
                        PostalCode6:
                          match: {}
                          schema: {index: 32}
                          max: 0
                required: [coding]
        elements:
          extension:
            index: 26
            slicing:
              slices:
                PostalCode:
                  match: {}
                  schema:
                    _required: true
                    index: 27
                    elements:
                      value[x]:
                        elements:
                          coding:
                            index: 28
                            slicing:
                              slices:
                                PostalCode3:
                                  match: {}
                                  schema:
                                    _required: true
                                    index: 29
                                    elements:
                                      code: {short: 郵遞區號, index: 30}
                                PostalCode5:
                                  match: {}
                                  schema: {index: 31}
                                  max: 0
                                PostalCode6:
                                  match: {}
                                  schema: {index: 32}
                                  max: 0
                        required: [coding]
        required: [extension]
    required: [postalCode, text]
package_version: 1.0.0
class: profile
kind: resource
url: https://nhicore.nhi.gov.tw/ci/StructureDefinition/Patient-twci
base: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Patient-twcore
version: 1.0.0
required: [address, name, telecom]