HL7 Vietnam VN Core FHIR Implementation Guide

Bộ Hướng dẫn Triển khai Core FHIR cho Việt Nam
0.8.0 - Draft for Community Review Viet Nam cờ

Bộ Hướng dẫn Triển khai Core FHIR cho Việt Nam - Draft for Community Review (v0.8.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions

Phần mở rộng: Tuổi thai — Gestational Age Extension - Hồ sơ JSON

Draft tại thời điểm 2026-07-10

Biểu diễn JSON của vn-ext-gestational-age phần mở rộng.

Raw json | Download

{
  "resourceType" : "StructureDefinition",
  "id" : "vn-ext-gestational-age",
  "language" : "vi",
  "text" : {
    "status" : "extensions",
    "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: StructureDefinition vn-ext-gestational-age</b></p><a name=\"vn-ext-gestational-age\"> </a><a name=\"hcvn-ext-gestational-age\"> </a><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border: 0px #F0F0F0 solid; font-size: 11px; font-family: verdana; vertical-align: top;\"><tr style=\"border: 1px #F0F0F0 solid; font-size: 11px; font-family: verdana; vertical-align: top\"><th style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; padding-top: 3px; padding-bottom: 3px\" class=\"hierarchy\"><a href=\"https://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#table-views\" title=\"The logical name of the element\">Name</a></th><th style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; padding-top: 3px; padding-bottom: 3px\" class=\"hierarchy\"><a href=\"https://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#table-views\" title=\"Information about the use of the element\">Flags</a></th><th style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; padding-top: 3px; padding-bottom: 3px\" class=\"hierarchy\"><a href=\"https://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#table-views\" title=\"Minimum and Maximum # of times the element can appear in the instance\">Card.</a></th><th style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; padding-top: 3px; padding-bottom: 3px; width: 100px\" class=\"hierarchy\"><a href=\"https://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#table-views\" title=\"Reference to the type of the element\">Type</a></th><th style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; padding-top: 3px; padding-bottom: 3px\" class=\"hierarchy\"><a href=\"https://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#table-views\" title=\"Additional information about the element\">Description &amp; Constraints</a><span style=\"float: right\"><a href=\"https://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#table-views\" title=\"Legend for this format\"><img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3goXBCwdPqAP0wAAAldJREFUOMuNk0tIlFEYhp9z/vE2jHkhxXA0zJCMitrUQlq4lnSltEqCFhFG2MJFhIvIFpkEWaTQqjaWZRkp0g26URZkTpbaaOJkDqk10szoODP//7XIMUe0elcfnPd9zsfLOYplGrpRwZaqTtw3K7PtGem7Q6FoidbGgqHVy/HRb669R+56zx7eRV1L31JGxYbBtjKK93cxeqfyQHbehkZbUkK20goELEuIzEd+dHS+qz/Y8PTSif0FnGkbiwcAjHaU1+QWOptFiyCLp/LnKptpqIuXHx6rbR26kJcBX3yLgBfnd7CxwJmflpP2wUg0HIAoUUpZBmKzELGWcN8nAr6Gpu7tLU/CkwAaoKTWRSQyt89Q8w6J+oVQkKnBoblH7V0PPvUOvDYXfopE/SJmALsxnVm6LbkotrUtNowMeIrVrBcBpaMmdS0j9df7abpSuy7HWehwJdt1lhVwi/J58U5beXGAF6c3UXLycw1wdFklArBn87xdh0ZsZtArghBdAA3+OEDVubG4UEzP6x1FOWneHh2VDAHBAt80IbdXDcesNoCvs3E5AFyNSU5nbrDPZpcUEQQTFZiEVx+51fxMhhyJEAgvlriadIJZZksRuwBYMOPBbO3hePVVqgEJhFeUuFLhIPkRP6BQLIBrmMenujm/3g4zc398awIe90Zb5A1vREALqneMcYgP/xVQWlG+Ncu5vgwwlaUNx+3799rfe96u9K0JSDXcOzOTJg4B6IgmXfsygc7/Bvg9g9E58/cDVmGIBOP/zT8Bz1zqWqpbXIsd0O9hajXfL6u4BaOS6SeWAAAAAElFTkSuQmCC\" alt=\"doco\" style=\"background-color: inherit\"/></a></span></th></tr><tr style=\"border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white\"><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck1.png)\" class=\"hierarchy\"><img src=\"tbl_spacer.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"icon_element.gif\" alt=\".\" style=\"background-color: white; background-color: inherit\" title=\"Element\" class=\"hierarchy\"/> <a href=\"StructureDefinition-vn-ext-gestational-age-definitions.html#Extension\" title=\"Tuần tuổi thai thực tế tại thời điểm thực hiện thủ thuật/ghi nhận trên giấy tờ KCB, tính bằng số nguyên tuần (1–42 tuần).\nMapping QĐ 3176/QĐ-BYT: TUOI_THAI (Bảng 7 STT 10 — Giấy ra viện; Bảng 11 STT 12 — Giấy chứng nhận nghỉ việc hưởng BHXH).\nTrường TUOI_THAI bắt buộc theo điều kiện khi MA_DINH_CHI_THAI='1' (đình chỉ thai nghén). Quan hệ điều kiện này được ràng buộc ở tầng logical model qua invariant `bhyt-xml7-abortion-fields-required` (Bảng 7) và `bhyt-xml11-abortion-fields-required` (Bảng 11); extension chỉ mang giá trị số tuần, không tự enforce điều kiện bắt buộc.\nActual gestational age in whole weeks (1–42) at the time of the procedure or when recorded on the KCB document; FHIR R4 base has no gestational-age element on Procedure/DocumentReference.\nCăn cứ: QĐ 3176/QĐ-BYT (29/10/2024).\">Extension</a><a name=\"Extension\"> </a></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"/><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"opacity: 0.5\">0</span><span style=\"opacity: 0.5\">..</span><span style=\"opacity: 0.5\">*</span></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><a href=\"http://hl7.org/fhir/R4/extensibility.html#Extension\">Extension</a></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\">Tuổi thai — Gestational Age Extension</td></tr>\r\n<tr style=\"border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: #F7F7F7\"><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck10.png)\" class=\"hierarchy\"><img src=\"tbl_spacer.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"tbl_vjoin.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"icon_extension_simple.png\" alt=\".\" style=\"background-color: #F7F7F7; background-color: inherit\" title=\"Simple Extension\" class=\"hierarchy\"/> <a style=\"text-decoration:line-through; text-decoration:line-through\" href=\"StructureDefinition-vn-ext-gestational-age-definitions.html#Extension.extension\">extension</a><a name=\"Extension.extension\"> </a></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"/><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"text-decoration:line-through\"/><span style=\"text-decoration:line-through\">0</span><span style=\"text-decoration:line-through\">..</span><span style=\"text-decoration:line-through\">0</span></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"/><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"font-style: italic\">Extension</span></td></tr>\r\n<tr style=\"border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white\"><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck10.png)\" class=\"hierarchy\"><img src=\"tbl_spacer.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"tbl_vjoin.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"icon_element.gif\" alt=\".\" style=\"background-color: white; background-color: inherit\" title=\"Element\" class=\"hierarchy\"/> <a href=\"StructureDefinition-vn-ext-gestational-age-definitions.html#Extension.url\">url</a><a name=\"Extension.url\"> </a></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"/><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"opacity: 0.5\">1</span><span style=\"opacity: 0.5\">..</span><span style=\"opacity: 0.5\">1</span></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><a style=\"opacity: 0.5; opacity: 0.5\" href=\"http://hl7.org/fhir/R4/datatypes.html#uri\">uri</a></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"color: darkgreen\">&quot;http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-gestational-age&quot;</span></td></tr>\r\n<tr style=\"border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: #F7F7F7\"><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck00.png)\" class=\"hierarchy\"><img src=\"tbl_spacer.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"tbl_vjoin_end.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"icon_primitive.png\" alt=\".\" style=\"background-color: #F7F7F7; background-color: inherit\" title=\"Primitive Data Type\" class=\"hierarchy\"/> <a href=\"StructureDefinition-vn-ext-gestational-age-definitions.html#Extension.value[x]\" title=\"Số tuần tuổi thai thực tế (1–42 tuần) theo trường TUOI_THAI của QĐ 3176/QĐ-BYT (Bảng 7 STT 10, Bảng 11 STT 12). Bắt buộc theo điều kiện khi MA_DINH_CHI_THAI='1' — điều kiện được enforce bằng invariant `bhyt-xml7-abortion-fields-required` / `bhyt-xml11-abortion-fields-required` ở logical model, không phải bởi extension này.\">value[x]</a><a name=\"Extension.value_x_\"> </a></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><a style=\"padding-left: 3px; padding-right: 3px; border: 1px maroon solid; font-weight: bold; color: #301212; background-color: #fdf4f4;; padding-left: 3px; padding-right: 3px; border: 1px maroon solid; font-weight: bold; color: #301212; background-color: #fdf4f4;\" href=\"http://hl7.org/fhir/R4/conformance-rules.html#constraints\" title=\"This element has or is affected by constraints ( vn-gestational-age-range )\">C</a></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\">1..<span style=\"opacity: 0.5\">1</span></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><a href=\"http://hl7.org/fhir/R4/datatypes.html#integer\">integer</a></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\">Tuổi thai (tuần), 1–42 — TUOI_THAI<br class=\"constraint\"/><span title=\"null\" class=\"constraint\">Constraints: </span><span style=\"font-weight:bold\" title=\"Tuổi thai phải nằm trong khoảng 1–42 tuần theo QĐ 3176/QĐ-BYT (trường TUOI_THAI). Gestational age must be within 1–42 weeks.\" class=\"constraint\">vn-gestational-age-range</span></td></tr>\r\n<tr><td colspan=\"5\" class=\"hierarchy\"><br/><a href=\"https://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#table-views\" title=\"Legend for this format\"><img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3goXBCwdPqAP0wAAAldJREFUOMuNk0tIlFEYhp9z/vE2jHkhxXA0zJCMitrUQlq4lnSltEqCFhFG2MJFhIvIFpkEWaTQqjaWZRkp0g26URZkTpbaaOJkDqk10szoODP//7XIMUe0elcfnPd9zsfLOYplGrpRwZaqTtw3K7PtGem7Q6FoidbGgqHVy/HRb669R+56zx7eRV1L31JGxYbBtjKK93cxeqfyQHbehkZbUkK20goELEuIzEd+dHS+qz/Y8PTSif0FnGkbiwcAjHaU1+QWOptFiyCLp/LnKptpqIuXHx6rbR26kJcBX3yLgBfnd7CxwJmflpP2wUg0HIAoUUpZBmKzELGWcN8nAr6Gpu7tLU/CkwAaoKTWRSQyt89Q8w6J+oVQkKnBoblH7V0PPvUOvDYXfopE/SJmALsxnVm6LbkotrUtNowMeIrVrBcBpaMmdS0j9df7abpSuy7HWehwJdt1lhVwi/J58U5beXGAF6c3UXLycw1wdFklArBn87xdh0ZsZtArghBdAA3+OEDVubG4UEzP6x1FOWneHh2VDAHBAt80IbdXDcesNoCvs3E5AFyNSU5nbrDPZpcUEQQTFZiEVx+51fxMhhyJEAgvlriadIJZZksRuwBYMOPBbO3hePVVqgEJhFeUuFLhIPkRP6BQLIBrmMenujm/3g4zc398awIe90Zb5A1vREALqneMcYgP/xVQWlG+Ncu5vgwwlaUNx+3799rfe96u9K0JSDXcOzOTJg4B6IgmXfsygc7/Bvg9g9E58/cDVmGIBOP/zT8Bz1zqWqpbXIsd0O9hajXfL6u4BaOS6SeWAAAAAElFTkSuQmCC\" alt=\"doco\" style=\"background-color: inherit\"/> Documentation for this format</a></td></tr></table></div>"
  },
  "extension" : [
    {
      "url" : "http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-legal-basis",
      "valueCoding" : {
        "system" : "http://fhir.hl7.org.vn/core/CodeSystem/vn-legal-document-ref-cs",
        "code" : "QD-3176-2024"
      }
    }
  ],
  "url" : "http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-gestational-age",
  "identifier" : [
    {
      "system" : "urn:ietf:rfc:3986",
      "value" : "urn:oid:2.25.161089673617632664299011809196868855799.42.109"
    }
  ],
  "version" : "0.8.0",
  "name" : "VNCoreExtGestationalAge",
  "title" : "Tuổi thai — Gestational Age Extension",
  "status" : "draft",
  "date" : "2026-07-10",
  "publisher" : "Omi HealthTech / VN Core FHIR Community Initiative",
  "contact" : [
    {
      "name" : "Omi HealthTech / VN Core FHIR Community Initiative",
      "telecom" : [
        {
          "system" : "url",
          "value" : "https://hl7.org.vn"
        },
        {
          "system" : "email",
          "value" : "info@hl7.org.vn"
        }
      ]
    },
    {
      "name" : "Omi HealthTech (OmiGroup)",
      "telecom" : [
        {
          "system" : "url",
          "value" : "https://omihealthtech.vn"
        },
        {
          "system" : "url",
          "value" : "https://omigroup.vn"
        },
        {
          "system" : "email",
          "value" : "info@hl7.org.vn"
        }
      ]
    }
  ],
  "description" : "Tuần tuổi thai thực tế tại thời điểm thực hiện thủ thuật/ghi nhận trên giấy tờ KCB, tính bằng số nguyên tuần (1–42 tuần).\nMapping QĐ 3176/QĐ-BYT: TUOI_THAI (Bảng 7 STT 10 — Giấy ra viện; Bảng 11 STT 12 — Giấy chứng nhận nghỉ việc hưởng BHXH).\nTrường TUOI_THAI bắt buộc theo điều kiện khi MA_DINH_CHI_THAI='1' (đình chỉ thai nghén). Quan hệ điều kiện này được ràng buộc ở tầng logical model qua invariant `bhyt-xml7-abortion-fields-required` (Bảng 7) và `bhyt-xml11-abortion-fields-required` (Bảng 11); extension chỉ mang giá trị số tuần, không tự enforce điều kiện bắt buộc.\nActual gestational age in whole weeks (1–42) at the time of the procedure or when recorded on the KCB document; FHIR R4 base has no gestational-age element on Procedure/DocumentReference.\nCăn cứ: QĐ 3176/QĐ-BYT (29/10/2024).",
  "jurisdiction" : [
    {
      "coding" : [
        {
          "system" : "urn:iso:std:iso:3166",
          "code" : "VN",
          "display" : "Viet Nam"
        }
      ]
    }
  ],
  "fhirVersion" : "4.0.1",
  "mapping" : [
    {
      "identity" : "rim",
      "uri" : "http://hl7.org/v3",
      "name" : "RIM Mapping"
    }
  ],
  "kind" : "complex-type",
  "abstract" : false,
  "context" : [
    {
      "type" : "element",
      "expression" : "Procedure"
    },
    {
      "type" : "element",
      "expression" : "DocumentReference"
    }
  ],
  "type" : "Extension",
  "baseDefinition" : "http://hl7.org/fhir/StructureDefinition/Extension",
  "derivation" : "constraint",
  "snapshot" : {
    "extension" : [
      {
        "url" : "http://hl7.org/fhir/tools/StructureDefinition/snapshot-base-version",
        "valueString" : "4.0.1"
      }
    ],
    "element" : [
      {
        "id" : "Extension",
        "path" : "Extension",
        "short" : "Tuổi thai — Gestational Age Extension",
        "definition" : "Tuần tuổi thai thực tế tại thời điểm thực hiện thủ thuật/ghi nhận trên giấy tờ KCB, tính bằng số nguyên tuần (1–42 tuần).\nMapping QĐ 3176/QĐ-BYT: TUOI_THAI (Bảng 7 STT 10 — Giấy ra viện; Bảng 11 STT 12 — Giấy chứng nhận nghỉ việc hưởng BHXH).\nTrường TUOI_THAI bắt buộc theo điều kiện khi MA_DINH_CHI_THAI='1' (đình chỉ thai nghén). Quan hệ điều kiện này được ràng buộc ở tầng logical model qua invariant `bhyt-xml7-abortion-fields-required` (Bảng 7) và `bhyt-xml11-abortion-fields-required` (Bảng 11); extension chỉ mang giá trị số tuần, không tự enforce điều kiện bắt buộc.\nActual gestational age in whole weeks (1–42) at the time of the procedure or when recorded on the KCB document; FHIR R4 base has no gestational-age element on Procedure/DocumentReference.\nCăn cứ: QĐ 3176/QĐ-BYT (29/10/2024).",
        "min" : 0,
        "max" : "*",
        "base" : {
          "path" : "Extension",
          "min" : 0,
          "max" : "*"
        },
        "condition" : [
          "ele-1"
        ],
        "constraint" : [
          {
            "key" : "ele-1",
            "severity" : "error",
            "human" : "All FHIR elements must have a @value or children",
            "expression" : "hasValue() or (children().count() > id.count())",
            "xpath" : "@value|f:*|h:div",
            "source" : "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key" : "ext-1",
            "severity" : "error",
            "human" : "Must have either extensions or value[x], not both",
            "expression" : "extension.exists() != value.exists()",
            "xpath" : "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
            "source" : "http://hl7.org/fhir/StructureDefinition/Extension"
          }
        ],
        "isModifier" : false
      },
      {
        "id" : "Extension.id",
        "path" : "Extension.id",
        "representation" : [
          "xmlAttr"
        ],
        "short" : "Unique id for inter-element referencing",
        "definition" : "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "Element.id",
          "min" : 0,
          "max" : "1"
        },
        "type" : [
          {
            "extension" : [
              {
                "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
                "valueUrl" : "string"
              }
            ],
            "code" : "http://hl7.org/fhirpath/System.String"
          }
        ],
        "isModifier" : false,
        "isSummary" : false,
        "mapping" : [
          {
            "identity" : "rim",
            "map" : "n/a"
          }
        ]
      },
      {
        "id" : "Extension.extension",
        "path" : "Extension.extension",
        "slicing" : {
          "discriminator" : [
            {
              "type" : "value",
              "path" : "url"
            }
          ],
          "description" : "Extensions are always sliced by (at least) url",
          "rules" : "open"
        },
        "short" : "Extension",
        "definition" : "An Extension",
        "min" : 0,
        "max" : "0",
        "base" : {
          "path" : "Element.extension",
          "min" : 0,
          "max" : "*"
        },
        "type" : [
          {
            "code" : "Extension"
          }
        ],
        "constraint" : [
          {
            "key" : "ele-1",
            "severity" : "error",
            "human" : "All FHIR elements must have a @value or children",
            "expression" : "hasValue() or (children().count() > id.count())",
            "xpath" : "@value|f:*|h:div",
            "source" : "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key" : "ext-1",
            "severity" : "error",
            "human" : "Must have either extensions or value[x], not both",
            "expression" : "extension.exists() != value.exists()",
            "xpath" : "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
            "source" : "http://hl7.org/fhir/StructureDefinition/Extension"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "Extension.url",
        "path" : "Extension.url",
        "representation" : [
          "xmlAttr"
        ],
        "short" : "identifies the meaning of the extension",
        "definition" : "Source of the definition for the extension code - a logical name or a URL.",
        "comment" : "The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension.",
        "min" : 1,
        "max" : "1",
        "base" : {
          "path" : "Extension.url",
          "min" : 1,
          "max" : "1"
        },
        "type" : [
          {
            "extension" : [
              {
                "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
                "valueUrl" : "uri"
              }
            ],
            "code" : "http://hl7.org/fhirpath/System.String"
          }
        ],
        "fixedUri" : "http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-gestational-age",
        "isModifier" : false,
        "isSummary" : false,
        "mapping" : [
          {
            "identity" : "rim",
            "map" : "N/A"
          }
        ]
      },
      {
        "id" : "Extension.value[x]",
        "path" : "Extension.value[x]",
        "short" : "Tuổi thai (tuần), 1–42 — TUOI_THAI",
        "definition" : "Số tuần tuổi thai thực tế (1–42 tuần) theo trường TUOI_THAI của QĐ 3176/QĐ-BYT (Bảng 7 STT 10, Bảng 11 STT 12). Bắt buộc theo điều kiện khi MA_DINH_CHI_THAI='1' — điều kiện được enforce bằng invariant `bhyt-xml7-abortion-fields-required` / `bhyt-xml11-abortion-fields-required` ở logical model, không phải bởi extension này.",
        "min" : 1,
        "max" : "1",
        "base" : {
          "path" : "Extension.value[x]",
          "min" : 0,
          "max" : "1"
        },
        "type" : [
          {
            "code" : "integer"
          }
        ],
        "constraint" : [
          {
            "key" : "ele-1",
            "severity" : "error",
            "human" : "All FHIR elements must have a @value or children",
            "expression" : "hasValue() or (children().count() > id.count())",
            "xpath" : "@value|f:*|h:div",
            "source" : "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key" : "vn-gestational-age-range",
            "severity" : "error",
            "human" : "Tuổi thai phải nằm trong khoảng 1–42 tuần theo QĐ 3176/QĐ-BYT (trường TUOI_THAI). Gestational age must be within 1–42 weeks.",
            "expression" : "$this >= 1 and $this <= 42",
            "source" : "http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-gestational-age"
          }
        ],
        "isModifier" : false,
        "isSummary" : false,
        "mapping" : [
          {
            "identity" : "rim",
            "map" : "N/A"
          }
        ]
      }
    ]
  },
  "differential" : {
    "element" : [
      {
        "id" : "Extension",
        "path" : "Extension",
        "short" : "Tuổi thai — Gestational Age Extension",
        "definition" : "Tuần tuổi thai thực tế tại thời điểm thực hiện thủ thuật/ghi nhận trên giấy tờ KCB, tính bằng số nguyên tuần (1–42 tuần).\nMapping QĐ 3176/QĐ-BYT: TUOI_THAI (Bảng 7 STT 10 — Giấy ra viện; Bảng 11 STT 12 — Giấy chứng nhận nghỉ việc hưởng BHXH).\nTrường TUOI_THAI bắt buộc theo điều kiện khi MA_DINH_CHI_THAI='1' (đình chỉ thai nghén). Quan hệ điều kiện này được ràng buộc ở tầng logical model qua invariant `bhyt-xml7-abortion-fields-required` (Bảng 7) và `bhyt-xml11-abortion-fields-required` (Bảng 11); extension chỉ mang giá trị số tuần, không tự enforce điều kiện bắt buộc.\nActual gestational age in whole weeks (1–42) at the time of the procedure or when recorded on the KCB document; FHIR R4 base has no gestational-age element on Procedure/DocumentReference.\nCăn cứ: QĐ 3176/QĐ-BYT (29/10/2024)."
      },
      {
        "id" : "Extension.extension",
        "path" : "Extension.extension",
        "max" : "0"
      },
      {
        "id" : "Extension.url",
        "path" : "Extension.url",
        "fixedUri" : "http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-gestational-age"
      },
      {
        "id" : "Extension.value[x]",
        "path" : "Extension.value[x]",
        "short" : "Tuổi thai (tuần), 1–42 — TUOI_THAI",
        "definition" : "Số tuần tuổi thai thực tế (1–42 tuần) theo trường TUOI_THAI của QĐ 3176/QĐ-BYT (Bảng 7 STT 10, Bảng 11 STT 12). Bắt buộc theo điều kiện khi MA_DINH_CHI_THAI='1' — điều kiện được enforce bằng invariant `bhyt-xml7-abortion-fields-required` / `bhyt-xml11-abortion-fields-required` ở logical model, không phải bởi extension này.",
        "min" : 1,
        "type" : [
          {
            "code" : "integer"
          }
        ],
        "constraint" : [
          {
            "key" : "vn-gestational-age-range",
            "severity" : "error",
            "human" : "Tuổi thai phải nằm trong khoảng 1–42 tuần theo QĐ 3176/QĐ-BYT (trường TUOI_THAI). Gestational age must be within 1–42 weeks.",
            "expression" : "$this >= 1 and $this <= 42",
            "source" : "http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-gestational-age"
          }
        ]
      }
    ]
  }
}