{
  "resourceType": "StructureDefinition",
  "url": "https://example.org/fhir/StructureDefinition/SirirajPatientProfile",
  "name": "SirirajPatientProfile",
  "status": "draft",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Patient",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Patient",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Patient",
        "path": "Patient",
        "mustSupport": true
      },
      {
        "id": "Patient.extension",
        "path": "Patient.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        },
        "min": 0
      },
      {
        "id": "Patient.extension:religion",
        "path": "Patient.extension",
        "sliceName": "religion",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://example.org/fhir/StructureDefinition/SirirajPatientReligionExtension"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Patient.extension:race",
        "path": "Patient.extension",
        "sliceName": "race",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://example.org/fhir/StructureDefinition/SirirajPatientRaceExtension"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Patient.extension:nationality",
        "path": "Patient.extension",
        "sliceName": "nationality",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://example.org/fhir/StructureDefinition/SirirajPatientExtension"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Patient.identifier",
        "path": "Patient.identifier",
        "mustSupport": true
      },
      {
        "id": "Patient.identifier.use",
        "path": "Patient.identifier.use",
        "short": "ประเภท : usual | official | temp | secondary | old (If known)"
      },
      {
        "id": "Patient.identifier.type.coding.system",
        "path": "Patient.identifier.type.coding.system",
        "short": "Terminology Source Reference"
      },
      {
        "id": "Patient.identifier.type.coding.code",
        "path": "Patient.identifier.type.coding.code",
        "short": "รหัสประเภทข้อมูล"
      },
      {
        "id": "Patient.identifier.type.coding.display",
        "path": "Patient.identifier.type.coding.display",
        "short": "คำอธิบายประเภทข้อมูล",
        "definition": "NationalID | HospitalNo | PassportNo | Work Permit"
      },
      {
        "id": "Patient.identifier.system",
        "path": "Patient.identifier.system",
        "short": "Source reference URL"
      },
      {
        "id": "Patient.identifier.value",
        "path": "Patient.identifier.value",
        "short": "ข้อมูล",
        "definition": "เลขที่บัตรประชาชน (National ID.)\r\nเลขประจำตัวผู้ป่วย (Hospital Number)\r\nเลขที่หนังสือเดินทาง (Passport Number)\r\nเลขที่ใบอนุญาตทำงานในประเทศสำหรับบุคคลต่างด้าว  (Work Permit Number)"
      },
      {
        "id": "Patient.active",
        "path": "Patient.active",
        "short": "สถานะของผู้ป่วย",
        "mustSupport": true
      },
      {
        "id": "Patient.name",
        "path": "Patient.name",
        "short": "ชื่อ นามสกุลผู้ป่วย",
        "mustSupport": true
      },
      {
        "id": "Patient.name.extension",
        "path": "Patient.name.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        },
        "min": 0
      },
      {
        "id": "Patient.name.extension:language",
        "path": "Patient.name.extension",
        "sliceName": "language",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://example.org/fhir/StructureDefinition/SirirajPatientNameExtension"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Patient.name.use",
        "path": "Patient.name.use",
        "short": "ประเภท : usual | official | temp | nickname | anonymous | old | maiden"
      },
      {
        "id": "Patient.name.text",
        "path": "Patient.name.text",
        "short": "ชื่อ",
        "definition": "คำนำหน้า ชื่อ นามสกุล"
      },
      {
        "id": "Patient.name.family",
        "path": "Patient.name.family",
        "short": "นามสกุล"
      },
      {
        "id": "Patient.name.given",
        "path": "Patient.name.given",
        "short": "ชื่อ"
      },
      {
        "id": "Patient.name.prefix",
        "path": "Patient.name.prefix",
        "short": "คำนำหน้าชื่อ"
      },
      {
        "id": "Patient.telecom",
        "path": "Patient.telecom",
        "short": "ช่องทางการติดต่อสื่อสาร",
        "definition": "Home Phone    โทรศัพท์บ้าน\r\nMobile Phone   โทรศัพท์\r\nEmail  อีเมล์แอดเดรส",
        "mustSupport": true
      },
      {
        "id": "Patient.telecom.system",
        "path": "Patient.telecom.system",
        "short": "รูปแบบการสื่อสาร : phone | fax | email | pager | url | sms | other"
      },
      {
        "id": "Patient.telecom.value",
        "path": "Patient.telecom.value",
        "short": "ข้อมูลการสื่อสาร"
      },
      {
        "id": "Patient.telecom.use",
        "path": "Patient.telecom.use",
        "short": "ประเภท : home | work | temp | old | mobile - purpose of this contact point"
      },
      {
        "id": "Patient.gender",
        "path": "Patient.gender",
        "short": "การระบุเพศ : male | female | other | unknown",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.birthDate",
        "path": "Patient.birthDate",
        "short": "วัน เดือน ปีเกิด",
        "definition": "รูปแบบของวันเกิด  ปี ค.ศ. - เดือน - วัน ( yyyy-MM-dd)",
        "mustSupport": true
      },
      {
        "id": "Patient.deceased[x]",
        "path": "Patient.deceased[x]",
        "short": "สถานะการมีชีวิตของบุคคล",
        "definition": "True  = ยังมีชีวิต\r\nFalse = เสียชีวิตแล้ว",
        "type": [
          {
            "code": "boolean"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.address",
        "path": "Patient.address",
        "short": "ที่อยู่สำหรับติดต่อ (ผู้ป่วย)",
        "mustSupport": true
      },
      {
        "id": "Patient.address.line",
        "path": "Patient.address.line",
        "short": "ที่อยู่"
      },
      {
        "id": "Patient.address.city",
        "path": "Patient.address.city",
        "short": "ตำบล"
      },
      {
        "id": "Patient.address.district",
        "path": "Patient.address.district",
        "short": "อำเภอ"
      },
      {
        "id": "Patient.address.state",
        "path": "Patient.address.state",
        "short": "จังหวัด"
      },
      {
        "id": "Patient.address.postalCode",
        "path": "Patient.address.postalCode",
        "short": "รหัสไปรษณีย์"
      },
      {
        "id": "Patient.address.country",
        "path": "Patient.address.country",
        "short": "ประเทศ"
      },
      {
        "id": "Patient.maritalStatus",
        "path": "Patient.maritalStatus",
        "short": "สถานภาพสมรส",
        "mustSupport": true
      },
      {
        "id": "Patient.maritalStatus.coding",
        "path": "Patient.maritalStatus.coding",
        "definition": "อ้างอิง code system จาก 2 แหล่งคือ\r\n1. http://terminology.hl7.org/CodeSystem/v3-MaritalStatus\r\n2. http://si.mahidol.ac.th/eHIS/MP_PATIENT"
      },
      {
        "id": "Patient.maritalStatus.coding.system",
        "path": "Patient.maritalStatus.coding.system",
        "short": "Terminology Source Reference",
        "definition": "อ้างอิง code system จาก 2 แหล่งคือ\r\n1. http://terminology.hl7.org/CodeSystem/v3-MaritalStatus\r\n2. http://si.mahidol.ac.th/eHIS/MP_PATIENT"
      },
      {
        "id": "Patient.maritalStatus.coding.code",
        "path": "Patient.maritalStatus.coding.code",
        "short": "รหัสสถานภาพสมรส"
      },
      {
        "id": "Patient.maritalStatus.coding.display",
        "path": "Patient.maritalStatus.coding.display",
        "short": "คำอธิบายสถานภาพสมรส"
      },
      {
        "id": "Patient.photo",
        "path": "Patient.photo",
        "short": "รูปผู้ป่วย",
        "definition": "รูปถ่ายผู้ป่วยทีบันทึกในเวชระเบียน",
        "mustSupport": true
      }
    ]
  }
}