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

Mô hình logic: Bản tin đồng bộ hồ sơ sức khỏe BHXH → CSDL sức khỏe BYT (resource-sync) — Logical Model (Phụ lục 03) - Mô tả chi tiết

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

Các định nghĩa cho vnHealthCheckupG12EnvelopeLm mô hình logic

Guidance on how to interpret the contents of this table can be foundhere

0. vnHealthCheckupG12EnvelopeLm
Definition

Logical model cho bản tin (envelope) đồng bộ tập dữ liệu hồ sơ sức khỏe từ Bảo hiểm xã hội Việt Nam (bên phát tin, ví dụ sender_id = G12/VSS) về Cơ sở dữ liệu sức khỏe cá nhân của Bộ Y tế qua Trục dữ liệu Bộ Y tế (api.emrhub.vn). API: POST /api/platform/resource-sync/push. Xác thực: OAuth2 + Bearer Token (lấy từ /api/auth/login, role=department). Định dạng JSON (UTF-8). service-type=100. Payload XML tuân theo mẫu QĐ 3176/QĐ-BYT (GIAMDINHHS). KHÁC với luồng BHYT Gateway thanh toán (gdbhyt.baohiemxahoi.gov.vn, XML 4210) — đây là surface đồng bộ hồ sơ sức khỏe BHXH → CSDL sức khỏe cá nhân. INFORMATIVE / non-normative: mô hình ánh xạ transport envelope resource-sync (không phải FHIR resource normative) — mapping aid cho implementer. Căn cứ: QĐ 2062/QĐ-BYT (07/7/2026) Phụ lục 03 (Phương án đồng bộ dữ liệu từ BHXH Việt Nam) — THAY Phụ lục 03 QĐ 1551/QĐ-BYT (31/5/2026); đọc hợp nhất. API OAuth2 + Bearer, POST /api/platform/resource-sync/push (service-type=100, txn_type=sync_ehr, msg_type=101/102), checksum RSASHA256.

ShortBản tin đồng bộ hồ sơ sức khỏe BHXH → CSDL sức khỏe BYT (resource-sync) — Logical Model (Phụ lục 03)
Control0..*
Is Modifierfalse
Logical ModelInstances of this logical model are not marked to be the target of a Reference
2. vnHealthCheckupG12EnvelopeLm.httpHeader
Definition

HTTP headers của request

ShortHTTP headers của request
Control1..1
TypeBackboneElement
Invariantsele-1: All FHIR elements must have a @value or children (hasValue() or (children().count() > id.count()))
4. vnHealthCheckupG12EnvelopeLm.httpHeader.id
Definition

Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.

ShortUnique id for inter-element referencing
Control0..1
Typestring
Is Modifierfalse
XML FormatIn the XML format, this property is represented as an attribute.
Summaryfalse
6. vnHealthCheckupG12EnvelopeLm.httpHeader.extension
Definition

May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.

ShortAdditional content defined by implementations
Comments

There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.

Control0..*
TypeExtension
Is Modifierfalse
Summaryfalse
Alternate Namesextensions, user content
Invariantsele-1: All FHIR elements must have a @value or children (hasValue() or (children().count() > id.count()))
ext-1: Must have either extensions or value[x], not both (extension.exists() != value.exists())
SlicingThis element introduces a set of slices on vnHealthCheckupG12EnvelopeLm.httpHeader.extension. The slices areUnordered and Open, and can be differentiated using the following discriminators:
  • value @ url
  • 8. vnHealthCheckupG12EnvelopeLm.httpHeader.modifierExtension
    Definition

    May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.

    Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).

    ShortExtensions that cannot be ignored even if unrecognized
    Comments

    There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.

    Control0..*
    TypeExtension
    Is Modifiertrue because Modifier extensions are expected to modify the meaning or interpretation of the element that contains them
    Summarytrue
    Requirements

    Modifier extensions allow for extensions that cannot be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the definition of modifier extensions.

    Alternate Namesextensions, user content, modifiers
    Invariantsele-1: All FHIR elements must have a @value or children (hasValue() or (children().count() > id.count()))
    ext-1: Must have either extensions or value[x], not both (extension.exists() != value.exists())
    10. vnHealthCheckupG12EnvelopeLm.httpHeader.contentType
    Definition

    Content-Type = application/json

    ShortContent-Type = application/json
    Control1..1
    Typestring
    Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
    12. vnHealthCheckupG12EnvelopeLm.httpHeader.accept
    Definition

    Accept = /

    ShortAccept = */*
    Control1..1
    Typestring
    Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
    14. vnHealthCheckupG12EnvelopeLm.httpHeader.acceptEncoding
    Definition

    Accept-Encoding = gzip,deflate,br

    ShortAccept-Encoding = gzip,deflate,br
    Control1..1
    Typestring
    Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
    16. vnHealthCheckupG12EnvelopeLm.httpHeader.authorization
    Definition

    Authorization = Bearer + Access Token (lấy từ POST /api/auth/login, role=department)

    ShortAuthorization = Bearer + Access Token (lấy từ POST /api/auth/login, role=department)
    Control1..1
    Typestring
    Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
    18. vnHealthCheckupG12EnvelopeLm.httpHeader.serviceType
    Definition

    service-type = 100 (Dịch vụ data sync vào Trục dữ liệu Bộ Y tế)

    Shortservice-type = 100 (Dịch vụ data sync vào Trục dữ liệu Bộ Y tế)
    Control1..1
    Typestring
    Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
    20. vnHealthCheckupG12EnvelopeLm.header
    Definition

    header - Thông tin header bản tin (JSON Object)

    Shortheader - Thông tin header bản tin (JSON Object)
    Control1..1
    TypeBackboneElement
    Invariantsele-1: All FHIR elements must have a @value or children (hasValue() or (children().count() > id.count()))
    22. vnHealthCheckupG12EnvelopeLm.header.id
    Definition

    Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.

    ShortUnique id for inter-element referencing
    Control0..1
    Typestring
    Is Modifierfalse
    XML FormatIn the XML format, this property is represented as an attribute.
    Summaryfalse
    24. vnHealthCheckupG12EnvelopeLm.header.extension
    Definition

    May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.

    ShortAdditional content defined by implementations
    Comments

    There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.

    Control0..*
    TypeExtension
    Is Modifierfalse
    Summaryfalse
    Alternate Namesextensions, user content
    Invariantsele-1: All FHIR elements must have a @value or children (hasValue() or (children().count() > id.count()))
    ext-1: Must have either extensions or value[x], not both (extension.exists() != value.exists())
    SlicingThis element introduces a set of slices on vnHealthCheckupG12EnvelopeLm.header.extension. The slices areUnordered and Open, and can be differentiated using the following discriminators:
    • value @ url
    • 26. vnHealthCheckupG12EnvelopeLm.header.modifierExtension
      Definition

      May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.

      Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).

      ShortExtensions that cannot be ignored even if unrecognized
      Comments

      There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.

      Control0..*
      TypeExtension
      Is Modifiertrue because Modifier extensions are expected to modify the meaning or interpretation of the element that contains them
      Summarytrue
      Requirements

      Modifier extensions allow for extensions that cannot be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the definition of modifier extensions.

      Alternate Namesextensions, user content, modifiers
      Invariantsele-1: All FHIR elements must have a @value or children (hasValue() or (children().count() > id.count()))
      ext-1: Must have either extensions or value[x], not both (extension.exists() != value.exists())
      28. vnHealthCheckupG12EnvelopeLm.header.version
      Definition

      version - Phiên bản hệ thống Trục dữ liệu BYT

      Shortversion - Phiên bản hệ thống Trục dữ liệu BYT
      NoteThis is a business version Id, not a resource version Id (see discussion)
      Control1..1
      Typestring
      Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
      30. vnHealthCheckupG12EnvelopeLm.header.senderId
      Definition

      sender_id - Mã định danh bên phát tin (ví dụ: G12/VSS — BHXH Việt Nam)

      Shortsender_id - Mã định danh bên phát tin (ví dụ: G12/VSS — BHXH Việt Nam)
      Control1..1
      Typestring
      Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
      32. vnHealthCheckupG12EnvelopeLm.header.receiverId
      Definition

      receiver_id - Mã bên nhận tin (ví dụ: TDLBYT)

      Shortreceiver_id - Mã bên nhận tin (ví dụ: TDLBYT)
      Control1..1
      Typestring
      Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
      34. vnHealthCheckupG12EnvelopeLm.header.txnType
      Definition

      txn_type - Loại giao dịch. Giá trị cố định: sync_ehr (đồng bộ tập dữ liệu hồ sơ sức khỏe theo QĐ 3176/QĐ-BYT)

      Shorttxn_type - Loại giao dịch. Giá trị cố định: sync_ehr (đồng bộ tập dữ liệu hồ sơ sức khỏe theo QĐ 3176/QĐ-BYT)
      Control1..1
      Typestring
      Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
      36. vnHealthCheckupG12EnvelopeLm.header.msgId
      Definition

      msg_id - Mã giao dịch = sender_id + YY (2 ký tự năm) + MM (2 ký tự tháng) + DD (2 ký tự ngày) + UUIDv4 (không gạch)

      Shortmsg_id - Mã giao dịch = sender_id + YY (2 ký tự năm) + MM (2 ký tự tháng) + DD (2 ký tự ngày) + UUIDv4 (không gạch)
      Control1..1
      Typestring
      Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
      38. vnHealthCheckupG12EnvelopeLm.header.msgType
      Definition

      msg_type - REQUEST cố định = 101 (thông điệp phát tin đồng bộ). Response dùng 102 (xem nhóm response bên dưới)

      Shortmsg_type - REQUEST cố định = 101 (thông điệp phát tin đồng bộ). Response dùng 102 (xem nhóm response bên dưới)
      Control1..1
      Typestring
      Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
      40. vnHealthCheckupG12EnvelopeLm.header.dataType
      Definition

      data_type - Định dạng file. Giá trị: xml/base64 (Phụ lục 03)

      Shortdata_type - Định dạng file. Giá trị: xml/base64 (Phụ lục 03)
      Control1..1
      Typestring
      Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
      42. vnHealthCheckupG12EnvelopeLm.header.sendDatetime
      Definition

      send_datetime - Thời điểm đẩy dữ liệu, Unix timestamp 13 số (ms). VĂN BẢN GỐC kiểu Long; mô hình hóa string vì vượt phạm vi FHIR R4 integer 32-bit (INFORMATIVE)

      Shortsend_datetime - Thời điểm đẩy dữ liệu, Unix timestamp 13 số (ms). VĂN BẢN GỐC kiểu Long; mô hình hóa string vì vượt phạm vi FHIR R4 integer 32-bit (INFORMATIVE)
      Control1..1
      Typestring
      Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
      44. vnHealthCheckupG12EnvelopeLm.data
      Definition

      data - File dữ liệu (XML hồ sơ sức khỏe mẫu GIAMDINHHS QĐ 3176/QĐ-BYT) đã encode Base64. VĂN BẢN GỐC ghi Object ở bảng request nhưng phần checksum ghi STRING BASE64 (văn bản tự mâu thuẫn) — mô hình hóa string base64. Bắt buộc trong thực tế dù bảng gốc không đánh dấu 'x'

      Shortdata - File dữ liệu (XML hồ sơ sức khỏe mẫu GIAMDINHHS QĐ 3176/QĐ-BYT) đã encode Base64. VĂN BẢN GỐC ghi Object ở bảng request nhưng phần checksum ghi STRING BASE64 (văn bản tự mâu thuẫn) — mô hình hóa string base64. Bắt buộc trong thực tế dù bảng gốc không đánh dấu 'x'
      Control1..1
      Typestring
      Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
      46. vnHealthCheckupG12EnvelopeLm.signature
      Definition

      signature - Chữ ký số checksum RSASHA256 giữa header và data (bên phát tin tạo). Công thức: bỏ whitespace/newline → Uppercase(SHA256(header)) + '.' + Uppercase(SHA256(data)) → RSASHA256 bằng private key → Uppercase(base64). Bắt buộc trong thực tế dù bảng gốc không đánh dấu 'x'

      Shortsignature - Chữ ký số checksum RSASHA256 giữa header và data (bên phát tin tạo). Công thức: bỏ whitespace/newline → Uppercase(SHA256(header)) + '.' + Uppercase(SHA256(data)) → RSASHA256 bằng private key → Uppercase(base64). Bắt buộc trong thực tế dù bảng gốc không đánh dấu 'x'
      Control1..1
      Typestring
      Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
      48. vnHealthCheckupG12EnvelopeLm.response
      Definition

      Bản tin phản hồi từ Trục BYT (msg_type=102)

      ShortBản tin phản hồi từ Trục BYT (msg_type=102)
      Control0..1
      TypeBackboneElement
      Invariantsele-1: All FHIR elements must have a @value or children (hasValue() or (children().count() > id.count()))
      50. vnHealthCheckupG12EnvelopeLm.response.id
      Definition

      Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.

      ShortUnique id for inter-element referencing
      Control0..1
      Typestring
      Is Modifierfalse
      XML FormatIn the XML format, this property is represented as an attribute.
      Summaryfalse
      52. vnHealthCheckupG12EnvelopeLm.response.extension
      Definition

      May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.

      ShortAdditional content defined by implementations
      Comments

      There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.

      Control0..*
      TypeExtension
      Is Modifierfalse
      Summaryfalse
      Alternate Namesextensions, user content
      Invariantsele-1: All FHIR elements must have a @value or children (hasValue() or (children().count() > id.count()))
      ext-1: Must have either extensions or value[x], not both (extension.exists() != value.exists())
      SlicingThis element introduces a set of slices on vnHealthCheckupG12EnvelopeLm.response.extension. The slices areUnordered and Open, and can be differentiated using the following discriminators:
      • value @ url
      • 54. vnHealthCheckupG12EnvelopeLm.response.modifierExtension
        Definition

        May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.

        Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).

        ShortExtensions that cannot be ignored even if unrecognized
        Comments

        There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.

        Control0..*
        TypeExtension
        Is Modifiertrue because Modifier extensions are expected to modify the meaning or interpretation of the element that contains them
        Summarytrue
        Requirements

        Modifier extensions allow for extensions that cannot be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the definition of modifier extensions.

        Alternate Namesextensions, user content, modifiers
        Invariantsele-1: All FHIR elements must have a @value or children (hasValue() or (children().count() > id.count()))
        ext-1: Must have either extensions or value[x], not both (extension.exists() != value.exists())
        56. vnHealthCheckupG12EnvelopeLm.response.version
        Definition

        version - Phiên bản hệ thống Trục dữ liệu BYT

        Shortversion - Phiên bản hệ thống Trục dữ liệu BYT
        NoteThis is a business version Id, not a resource version Id (see discussion)
        Control0..1
        Typestring
        Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
        58. vnHealthCheckupG12EnvelopeLm.response.senderId
        Definition

        sender_id (response) - Mã bên nhận-nay-phát (ví dụ TDLBYT)

        Shortsender_id (response) - Mã bên nhận-nay-phát (ví dụ TDLBYT)
        Control0..1
        Typestring
        Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
        60. vnHealthCheckupG12EnvelopeLm.response.receiverId
        Definition

        receiver_id (response) - Mã bên phát tin gốc (ví dụ G12/VSS)

        Shortreceiver_id (response) - Mã bên phát tin gốc (ví dụ G12/VSS)
        Control0..1
        Typestring
        Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
        62. vnHealthCheckupG12EnvelopeLm.response.txnType
        Definition

        txn_type (response) = sync_ehr

        Shorttxn_type (response) = sync_ehr
        Control0..1
        Typestring
        Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
        64. vnHealthCheckupG12EnvelopeLm.response.msgType
        Definition

        msg_type (response) = 102

        Shortmsg_type (response) = 102
        Control0..1
        Typestring
        Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
        66. vnHealthCheckupG12EnvelopeLm.response.msgId
        Definition

        msg_id (response) - Mã giao dịch phía Trục (sender_id + YY+MM+DD + UUIDv4)

        Shortmsg_id (response) - Mã giao dịch phía Trục (sender_id + YY+MM+DD + UUIDv4)
        Control0..1
        Typestring
        Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
        68. vnHealthCheckupG12EnvelopeLm.response.refMsgId
        Definition

        ref_msg_id - msg_id của bên phát tin gốc

        Shortref_msg_id - msg_id của bên phát tin gốc
        Control0..1
        Typestring
        Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
        70. vnHealthCheckupG12EnvelopeLm.response.sendDatetime
        Definition

        send_datetime (response) - Unix timestamp 13 số

        Shortsend_datetime (response) - Unix timestamp 13 số
        Control0..1
        Typestring
        Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
        72. vnHealthCheckupG12EnvelopeLm.response.resDatetime
        Definition

        res_datetime - Ngày phản hồi (Unix timestamp 13 số)

        Shortres_datetime - Ngày phản hồi (Unix timestamp 13 số)
        Control0..1
        Typestring
        Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
        74. vnHealthCheckupG12EnvelopeLm.response.resCode
        Definition

        res_code - Mã trạng thái tiếp nhận (CM_SUCCESS | CM_INVALID_REQUEST | PS_DS_RSA_SIGNATURE_INVALID/MISSING | PS_DS_CA_SIGNATURE_INVALID/MISSING | PS_DS_VERIFY_SUCCESS/FAIL | PS_DS_SAVE_SUCCESS/FAIL)

        Shortres_code - Mã trạng thái tiếp nhận (CM_SUCCESS | CM_INVALID_REQUEST | PS_DS_RSA_SIGNATURE_INVALID/MISSING | PS_DS_CA_SIGNATURE_INVALID/MISSING | PS_DS_VERIFY_SUCCESS/FAIL | PS_DS_SAVE_SUCCESS/FAIL)
        Control0..1
        Typestring
        Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
        76. vnHealthCheckupG12EnvelopeLm.response.resMsg
        Definition

        res_msg - Diễn giải trạng thái tiếp nhận

        Shortres_msg - Diễn giải trạng thái tiếp nhận
        Control0..1
        Typestring
        Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
        78. vnHealthCheckupG12EnvelopeLm.response.dataState
        Definition

        data.data_state - Mã trạng thái dữ liệu sau khi về kho

        Shortdata.data_state - Mã trạng thái dữ liệu sau khi về kho
        Control0..1
        Typestring
        Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
        80. vnHealthCheckupG12EnvelopeLm.response.dataStateMsg
        Definition

        data.data_state_msg - Chi tiết trạng thái dữ liệu (vd 'Data is received')

        Shortdata.data_state_msg - Chi tiết trạng thái dữ liệu (vd 'Data is received')
        Control0..1
        Typestring
        Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
        82. vnHealthCheckupG12EnvelopeLm.response.messageCheckCa
        Definition

        data.message_check_ca - Trạng thái kiểm tra chữ ký số bản tin

        Shortdata.message_check_ca - Trạng thái kiểm tra chữ ký số bản tin
        Control0..1
        Typestring
        Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
        84. vnHealthCheckupG12EnvelopeLm.response.messageNotify
        Definition

        data.message_notify - Trạng thái hệ thống với bản tin (vd 'Successfully inserted data to DATA LAKE')

        Shortdata.message_notify - Trạng thái hệ thống với bản tin (vd 'Successfully inserted data to DATA LAKE')
        Control0..1
        Typestring
        Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
        86. vnHealthCheckupG12EnvelopeLm.response.signature
        Definition

        signature (response) - Chữ ký RSASHA256 của bên nhận tin (Trục BYT)

        Shortsignature (response) - Chữ ký RSASHA256 của bên nhận tin (Trục BYT)
        Control0..1
        Typestring
        Primitive ValueThis primitive element may be present, or absent, or replaced by an extension

        Guidance on how to interpret the contents of this table can be foundhere

        0. vnHealthCheckupG12EnvelopeLm
        Definition

        Logical model cho bản tin (envelope) đồng bộ tập dữ liệu hồ sơ sức khỏe từ Bảo hiểm xã hội Việt Nam (bên phát tin, ví dụ sender_id = G12/VSS) về Cơ sở dữ liệu sức khỏe cá nhân của Bộ Y tế qua Trục dữ liệu Bộ Y tế (api.emrhub.vn). API: POST /api/platform/resource-sync/push. Xác thực: OAuth2 + Bearer Token (lấy từ /api/auth/login, role=department). Định dạng JSON (UTF-8). service-type=100. Payload XML tuân theo mẫu QĐ 3176/QĐ-BYT (GIAMDINHHS). KHÁC với luồng BHYT Gateway thanh toán (gdbhyt.baohiemxahoi.gov.vn, XML 4210) — đây là surface đồng bộ hồ sơ sức khỏe BHXH → CSDL sức khỏe cá nhân. INFORMATIVE / non-normative: mô hình ánh xạ transport envelope resource-sync (không phải FHIR resource normative) — mapping aid cho implementer. Căn cứ: QĐ 2062/QĐ-BYT (07/7/2026) Phụ lục 03 (Phương án đồng bộ dữ liệu từ BHXH Việt Nam) — THAY Phụ lục 03 QĐ 1551/QĐ-BYT (31/5/2026); đọc hợp nhất. API OAuth2 + Bearer, POST /api/platform/resource-sync/push (service-type=100, txn_type=sync_ehr, msg_type=101/102), checksum RSASHA256.

        ShortBản tin đồng bộ hồ sơ sức khỏe BHXH → CSDL sức khỏe BYT (resource-sync) — Logical Model (Phụ lục 03)
        Logical ModelInstances of this logical model are not marked to be the target of a Reference
        2. vnHealthCheckupG12EnvelopeLm.httpHeader
        Definition

        HTTP headers của request

        ShortHTTP headers của request
        Control1..1
        TypeBackboneElement
        4. vnHealthCheckupG12EnvelopeLm.httpHeader.contentType
        Definition

        Content-Type = application/json

        ShortContent-Type = application/json
        Control1..1
        Typestring
        Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
        6. vnHealthCheckupG12EnvelopeLm.httpHeader.accept
        Definition

        Accept = /

        ShortAccept = */*
        Control1..1
        Typestring
        Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
        8. vnHealthCheckupG12EnvelopeLm.httpHeader.acceptEncoding
        Definition

        Accept-Encoding = gzip,deflate,br

        ShortAccept-Encoding = gzip,deflate,br
        Control1..1
        Typestring
        Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
        10. vnHealthCheckupG12EnvelopeLm.httpHeader.authorization
        Definition

        Authorization = Bearer + Access Token (lấy từ POST /api/auth/login, role=department)

        ShortAuthorization = Bearer + Access Token (lấy từ POST /api/auth/login, role=department)
        Control1..1
        Typestring
        Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
        12. vnHealthCheckupG12EnvelopeLm.httpHeader.serviceType
        Definition

        service-type = 100 (Dịch vụ data sync vào Trục dữ liệu Bộ Y tế)

        Shortservice-type = 100 (Dịch vụ data sync vào Trục dữ liệu Bộ Y tế)
        Control1..1
        Typestring
        Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
        14. vnHealthCheckupG12EnvelopeLm.header
        Definition

        header - Thông tin header bản tin (JSON Object)

        Shortheader - Thông tin header bản tin (JSON Object)
        Control1..1
        TypeBackboneElement
        16. vnHealthCheckupG12EnvelopeLm.header.version
        Definition

        version - Phiên bản hệ thống Trục dữ liệu BYT

        Shortversion - Phiên bản hệ thống Trục dữ liệu BYT
        NoteThis is a business version Id, not a resource version Id (see discussion)
        Control1..1
        Typestring
        Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
        18. vnHealthCheckupG12EnvelopeLm.header.senderId
        Definition

        sender_id - Mã định danh bên phát tin (ví dụ: G12/VSS — BHXH Việt Nam)

        Shortsender_id - Mã định danh bên phát tin (ví dụ: G12/VSS — BHXH Việt Nam)
        Control1..1
        Typestring
        Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
        20. vnHealthCheckupG12EnvelopeLm.header.receiverId
        Definition

        receiver_id - Mã bên nhận tin (ví dụ: TDLBYT)

        Shortreceiver_id - Mã bên nhận tin (ví dụ: TDLBYT)
        Control1..1
        Typestring
        Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
        22. vnHealthCheckupG12EnvelopeLm.header.txnType
        Definition

        txn_type - Loại giao dịch. Giá trị cố định: sync_ehr (đồng bộ tập dữ liệu hồ sơ sức khỏe theo QĐ 3176/QĐ-BYT)

        Shorttxn_type - Loại giao dịch. Giá trị cố định: sync_ehr (đồng bộ tập dữ liệu hồ sơ sức khỏe theo QĐ 3176/QĐ-BYT)
        Control1..1
        Typestring
        Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
        24. vnHealthCheckupG12EnvelopeLm.header.msgId
        Definition

        msg_id - Mã giao dịch = sender_id + YY (2 ký tự năm) + MM (2 ký tự tháng) + DD (2 ký tự ngày) + UUIDv4 (không gạch)

        Shortmsg_id - Mã giao dịch = sender_id + YY (2 ký tự năm) + MM (2 ký tự tháng) + DD (2 ký tự ngày) + UUIDv4 (không gạch)
        Control1..1
        Typestring
        Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
        26. vnHealthCheckupG12EnvelopeLm.header.msgType
        Definition

        msg_type - REQUEST cố định = 101 (thông điệp phát tin đồng bộ). Response dùng 102 (xem nhóm response bên dưới)

        Shortmsg_type - REQUEST cố định = 101 (thông điệp phát tin đồng bộ). Response dùng 102 (xem nhóm response bên dưới)
        Control1..1
        Typestring
        Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
        28. vnHealthCheckupG12EnvelopeLm.header.dataType
        Definition

        data_type - Định dạng file. Giá trị: xml/base64 (Phụ lục 03)

        Shortdata_type - Định dạng file. Giá trị: xml/base64 (Phụ lục 03)
        Control1..1
        Typestring
        Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
        30. vnHealthCheckupG12EnvelopeLm.header.sendDatetime
        Definition

        send_datetime - Thời điểm đẩy dữ liệu, Unix timestamp 13 số (ms). VĂN BẢN GỐC kiểu Long; mô hình hóa string vì vượt phạm vi FHIR R4 integer 32-bit (INFORMATIVE)

        Shortsend_datetime - Thời điểm đẩy dữ liệu, Unix timestamp 13 số (ms). VĂN BẢN GỐC kiểu Long; mô hình hóa string vì vượt phạm vi FHIR R4 integer 32-bit (INFORMATIVE)
        Control1..1
        Typestring
        Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
        32. vnHealthCheckupG12EnvelopeLm.data
        Definition

        data - File dữ liệu (XML hồ sơ sức khỏe mẫu GIAMDINHHS QĐ 3176/QĐ-BYT) đã encode Base64. VĂN BẢN GỐC ghi Object ở bảng request nhưng phần checksum ghi STRING BASE64 (văn bản tự mâu thuẫn) — mô hình hóa string base64. Bắt buộc trong thực tế dù bảng gốc không đánh dấu 'x'

        Shortdata - File dữ liệu (XML hồ sơ sức khỏe mẫu GIAMDINHHS QĐ 3176/QĐ-BYT) đã encode Base64. VĂN BẢN GỐC ghi Object ở bảng request nhưng phần checksum ghi STRING BASE64 (văn bản tự mâu thuẫn) — mô hình hóa string base64. Bắt buộc trong thực tế dù bảng gốc không đánh dấu 'x'
        Control1..1
        Typestring
        Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
        34. vnHealthCheckupG12EnvelopeLm.signature
        Definition

        signature - Chữ ký số checksum RSASHA256 giữa header và data (bên phát tin tạo). Công thức: bỏ whitespace/newline → Uppercase(SHA256(header)) + '.' + Uppercase(SHA256(data)) → RSASHA256 bằng private key → Uppercase(base64). Bắt buộc trong thực tế dù bảng gốc không đánh dấu 'x'

        Shortsignature - Chữ ký số checksum RSASHA256 giữa header và data (bên phát tin tạo). Công thức: bỏ whitespace/newline → Uppercase(SHA256(header)) + '.' + Uppercase(SHA256(data)) → RSASHA256 bằng private key → Uppercase(base64). Bắt buộc trong thực tế dù bảng gốc không đánh dấu 'x'
        Control1..1
        Typestring
        Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
        36. vnHealthCheckupG12EnvelopeLm.response
        Definition

        Bản tin phản hồi từ Trục BYT (msg_type=102)

        ShortBản tin phản hồi từ Trục BYT (msg_type=102)
        Control0..1
        TypeBackboneElement
        38. vnHealthCheckupG12EnvelopeLm.response.version
        Definition

        version - Phiên bản hệ thống Trục dữ liệu BYT

        Shortversion - Phiên bản hệ thống Trục dữ liệu BYT
        NoteThis is a business version Id, not a resource version Id (see discussion)
        Control0..1
        Typestring
        Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
        40. vnHealthCheckupG12EnvelopeLm.response.senderId
        Definition

        sender_id (response) - Mã bên nhận-nay-phát (ví dụ TDLBYT)

        Shortsender_id (response) - Mã bên nhận-nay-phát (ví dụ TDLBYT)
        Control0..1
        Typestring
        Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
        42. vnHealthCheckupG12EnvelopeLm.response.receiverId
        Definition

        receiver_id (response) - Mã bên phát tin gốc (ví dụ G12/VSS)

        Shortreceiver_id (response) - Mã bên phát tin gốc (ví dụ G12/VSS)
        Control0..1
        Typestring
        Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
        44. vnHealthCheckupG12EnvelopeLm.response.txnType
        Definition

        txn_type (response) = sync_ehr

        Shorttxn_type (response) = sync_ehr
        Control0..1
        Typestring
        Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
        46. vnHealthCheckupG12EnvelopeLm.response.msgType
        Definition

        msg_type (response) = 102

        Shortmsg_type (response) = 102
        Control0..1
        Typestring
        Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
        48. vnHealthCheckupG12EnvelopeLm.response.msgId
        Definition

        msg_id (response) - Mã giao dịch phía Trục (sender_id + YY+MM+DD + UUIDv4)

        Shortmsg_id (response) - Mã giao dịch phía Trục (sender_id + YY+MM+DD + UUIDv4)
        Control0..1
        Typestring
        Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
        50. vnHealthCheckupG12EnvelopeLm.response.refMsgId
        Definition

        ref_msg_id - msg_id của bên phát tin gốc

        Shortref_msg_id - msg_id của bên phát tin gốc
        Control0..1
        Typestring
        Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
        52. vnHealthCheckupG12EnvelopeLm.response.sendDatetime
        Definition

        send_datetime (response) - Unix timestamp 13 số

        Shortsend_datetime (response) - Unix timestamp 13 số
        Control0..1
        Typestring
        Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
        54. vnHealthCheckupG12EnvelopeLm.response.resDatetime
        Definition

        res_datetime - Ngày phản hồi (Unix timestamp 13 số)

        Shortres_datetime - Ngày phản hồi (Unix timestamp 13 số)
        Control0..1
        Typestring
        Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
        56. vnHealthCheckupG12EnvelopeLm.response.resCode
        Definition

        res_code - Mã trạng thái tiếp nhận (CM_SUCCESS | CM_INVALID_REQUEST | PS_DS_RSA_SIGNATURE_INVALID/MISSING | PS_DS_CA_SIGNATURE_INVALID/MISSING | PS_DS_VERIFY_SUCCESS/FAIL | PS_DS_SAVE_SUCCESS/FAIL)

        Shortres_code - Mã trạng thái tiếp nhận (CM_SUCCESS | CM_INVALID_REQUEST | PS_DS_RSA_SIGNATURE_INVALID/MISSING | PS_DS_CA_SIGNATURE_INVALID/MISSING | PS_DS_VERIFY_SUCCESS/FAIL | PS_DS_SAVE_SUCCESS/FAIL)
        Control0..1
        Typestring
        Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
        58. vnHealthCheckupG12EnvelopeLm.response.resMsg
        Definition

        res_msg - Diễn giải trạng thái tiếp nhận

        Shortres_msg - Diễn giải trạng thái tiếp nhận
        Control0..1
        Typestring
        Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
        60. vnHealthCheckupG12EnvelopeLm.response.dataState
        Definition

        data.data_state - Mã trạng thái dữ liệu sau khi về kho

        Shortdata.data_state - Mã trạng thái dữ liệu sau khi về kho
        Control0..1
        Typestring
        Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
        62. vnHealthCheckupG12EnvelopeLm.response.dataStateMsg
        Definition

        data.data_state_msg - Chi tiết trạng thái dữ liệu (vd 'Data is received')

        Shortdata.data_state_msg - Chi tiết trạng thái dữ liệu (vd 'Data is received')
        Control0..1
        Typestring
        Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
        64. vnHealthCheckupG12EnvelopeLm.response.messageCheckCa
        Definition

        data.message_check_ca - Trạng thái kiểm tra chữ ký số bản tin

        Shortdata.message_check_ca - Trạng thái kiểm tra chữ ký số bản tin
        Control0..1
        Typestring
        Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
        66. vnHealthCheckupG12EnvelopeLm.response.messageNotify
        Definition

        data.message_notify - Trạng thái hệ thống với bản tin (vd 'Successfully inserted data to DATA LAKE')

        Shortdata.message_notify - Trạng thái hệ thống với bản tin (vd 'Successfully inserted data to DATA LAKE')
        Control0..1
        Typestring
        Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
        68. vnHealthCheckupG12EnvelopeLm.response.signature
        Definition

        signature (response) - Chữ ký RSASHA256 của bên nhận tin (Trục BYT)

        Shortsignature (response) - Chữ ký RSASHA256 của bên nhận tin (Trục BYT)
        Control0..1
        Typestring
        Primitive ValueThis primitive element may be present, or absent, or replaced by an extension

        Guidance on how to interpret the contents of this table can be foundhere

        0. vnHealthCheckupG12EnvelopeLm
        Definition

        Logical model cho bản tin (envelope) đồng bộ tập dữ liệu hồ sơ sức khỏe từ Bảo hiểm xã hội Việt Nam (bên phát tin, ví dụ sender_id = G12/VSS) về Cơ sở dữ liệu sức khỏe cá nhân của Bộ Y tế qua Trục dữ liệu Bộ Y tế (api.emrhub.vn). API: POST /api/platform/resource-sync/push. Xác thực: OAuth2 + Bearer Token (lấy từ /api/auth/login, role=department). Định dạng JSON (UTF-8). service-type=100. Payload XML tuân theo mẫu QĐ 3176/QĐ-BYT (GIAMDINHHS). KHÁC với luồng BHYT Gateway thanh toán (gdbhyt.baohiemxahoi.gov.vn, XML 4210) — đây là surface đồng bộ hồ sơ sức khỏe BHXH → CSDL sức khỏe cá nhân. INFORMATIVE / non-normative: mô hình ánh xạ transport envelope resource-sync (không phải FHIR resource normative) — mapping aid cho implementer. Căn cứ: QĐ 2062/QĐ-BYT (07/7/2026) Phụ lục 03 (Phương án đồng bộ dữ liệu từ BHXH Việt Nam) — THAY Phụ lục 03 QĐ 1551/QĐ-BYT (31/5/2026); đọc hợp nhất. API OAuth2 + Bearer, POST /api/platform/resource-sync/push (service-type=100, txn_type=sync_ehr, msg_type=101/102), checksum RSASHA256.

        ShortBản tin đồng bộ hồ sơ sức khỏe BHXH → CSDL sức khỏe BYT (resource-sync) — Logical Model (Phụ lục 03)
        Control0..*
        Is Modifierfalse
        Logical ModelInstances of this logical model are not marked to be the target of a Reference
        2. vnHealthCheckupG12EnvelopeLm.httpHeader
        Definition

        HTTP headers của request

        ShortHTTP headers của request
        Control1..1
        TypeBackboneElement
        Invariantsele-1: All FHIR elements must have a @value or children (hasValue() or (children().count() > id.count()))
        4. vnHealthCheckupG12EnvelopeLm.httpHeader.id
        Definition

        Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.

        ShortUnique id for inter-element referencing
        Control0..1
        Typestring
        Is Modifierfalse
        XML FormatIn the XML format, this property is represented as an attribute.
        Summaryfalse
        6. vnHealthCheckupG12EnvelopeLm.httpHeader.extension
        Definition

        May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.

        ShortAdditional content defined by implementations
        Comments

        There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.

        Control0..*
        TypeExtension
        Is Modifierfalse
        Summaryfalse
        Alternate Namesextensions, user content
        Invariantsele-1: All FHIR elements must have a @value or children (hasValue() or (children().count() > id.count()))
        ext-1: Must have either extensions or value[x], not both (extension.exists() != value.exists())
        SlicingThis element introduces a set of slices on vnHealthCheckupG12EnvelopeLm.httpHeader.extension. The slices areUnordered and Open, and can be differentiated using the following discriminators:
        • value @ url
        • 8. vnHealthCheckupG12EnvelopeLm.httpHeader.modifierExtension
          Definition

          May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.

          Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).

          ShortExtensions that cannot be ignored even if unrecognized
          Comments

          There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.

          Control0..*
          TypeExtension
          Is Modifiertrue because Modifier extensions are expected to modify the meaning or interpretation of the element that contains them
          Summarytrue
          Requirements

          Modifier extensions allow for extensions that cannot be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the definition of modifier extensions.

          Alternate Namesextensions, user content, modifiers
          Invariantsele-1: All FHIR elements must have a @value or children (hasValue() or (children().count() > id.count()))
          ext-1: Must have either extensions or value[x], not both (extension.exists() != value.exists())
          10. vnHealthCheckupG12EnvelopeLm.httpHeader.contentType
          Definition

          Content-Type = application/json

          ShortContent-Type = application/json
          Control1..1
          Typestring
          Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
          12. vnHealthCheckupG12EnvelopeLm.httpHeader.accept
          Definition

          Accept = /

          ShortAccept = */*
          Control1..1
          Typestring
          Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
          14. vnHealthCheckupG12EnvelopeLm.httpHeader.acceptEncoding
          Definition

          Accept-Encoding = gzip,deflate,br

          ShortAccept-Encoding = gzip,deflate,br
          Control1..1
          Typestring
          Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
          16. vnHealthCheckupG12EnvelopeLm.httpHeader.authorization
          Definition

          Authorization = Bearer + Access Token (lấy từ POST /api/auth/login, role=department)

          ShortAuthorization = Bearer + Access Token (lấy từ POST /api/auth/login, role=department)
          Control1..1
          Typestring
          Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
          18. vnHealthCheckupG12EnvelopeLm.httpHeader.serviceType
          Definition

          service-type = 100 (Dịch vụ data sync vào Trục dữ liệu Bộ Y tế)

          Shortservice-type = 100 (Dịch vụ data sync vào Trục dữ liệu Bộ Y tế)
          Control1..1
          Typestring
          Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
          20. vnHealthCheckupG12EnvelopeLm.header
          Definition

          header - Thông tin header bản tin (JSON Object)

          Shortheader - Thông tin header bản tin (JSON Object)
          Control1..1
          TypeBackboneElement
          Invariantsele-1: All FHIR elements must have a @value or children (hasValue() or (children().count() > id.count()))
          22. vnHealthCheckupG12EnvelopeLm.header.id
          Definition

          Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.

          ShortUnique id for inter-element referencing
          Control0..1
          Typestring
          Is Modifierfalse
          XML FormatIn the XML format, this property is represented as an attribute.
          Summaryfalse
          24. vnHealthCheckupG12EnvelopeLm.header.extension
          Definition

          May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.

          ShortAdditional content defined by implementations
          Comments

          There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.

          Control0..*
          TypeExtension
          Is Modifierfalse
          Summaryfalse
          Alternate Namesextensions, user content
          Invariantsele-1: All FHIR elements must have a @value or children (hasValue() or (children().count() > id.count()))
          ext-1: Must have either extensions or value[x], not both (extension.exists() != value.exists())
          SlicingThis element introduces a set of slices on vnHealthCheckupG12EnvelopeLm.header.extension. The slices areUnordered and Open, and can be differentiated using the following discriminators:
          • value @ url
          • 26. vnHealthCheckupG12EnvelopeLm.header.modifierExtension
            Definition

            May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.

            Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).

            ShortExtensions that cannot be ignored even if unrecognized
            Comments

            There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.

            Control0..*
            TypeExtension
            Is Modifiertrue because Modifier extensions are expected to modify the meaning or interpretation of the element that contains them
            Summarytrue
            Requirements

            Modifier extensions allow for extensions that cannot be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the definition of modifier extensions.

            Alternate Namesextensions, user content, modifiers
            Invariantsele-1: All FHIR elements must have a @value or children (hasValue() or (children().count() > id.count()))
            ext-1: Must have either extensions or value[x], not both (extension.exists() != value.exists())
            28. vnHealthCheckupG12EnvelopeLm.header.version
            Definition

            version - Phiên bản hệ thống Trục dữ liệu BYT

            Shortversion - Phiên bản hệ thống Trục dữ liệu BYT
            NoteThis is a business version Id, not a resource version Id (see discussion)
            Control1..1
            Typestring
            Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
            30. vnHealthCheckupG12EnvelopeLm.header.senderId
            Definition

            sender_id - Mã định danh bên phát tin (ví dụ: G12/VSS — BHXH Việt Nam)

            Shortsender_id - Mã định danh bên phát tin (ví dụ: G12/VSS — BHXH Việt Nam)
            Control1..1
            Typestring
            Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
            32. vnHealthCheckupG12EnvelopeLm.header.receiverId
            Definition

            receiver_id - Mã bên nhận tin (ví dụ: TDLBYT)

            Shortreceiver_id - Mã bên nhận tin (ví dụ: TDLBYT)
            Control1..1
            Typestring
            Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
            34. vnHealthCheckupG12EnvelopeLm.header.txnType
            Definition

            txn_type - Loại giao dịch. Giá trị cố định: sync_ehr (đồng bộ tập dữ liệu hồ sơ sức khỏe theo QĐ 3176/QĐ-BYT)

            Shorttxn_type - Loại giao dịch. Giá trị cố định: sync_ehr (đồng bộ tập dữ liệu hồ sơ sức khỏe theo QĐ 3176/QĐ-BYT)
            Control1..1
            Typestring
            Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
            36. vnHealthCheckupG12EnvelopeLm.header.msgId
            Definition

            msg_id - Mã giao dịch = sender_id + YY (2 ký tự năm) + MM (2 ký tự tháng) + DD (2 ký tự ngày) + UUIDv4 (không gạch)

            Shortmsg_id - Mã giao dịch = sender_id + YY (2 ký tự năm) + MM (2 ký tự tháng) + DD (2 ký tự ngày) + UUIDv4 (không gạch)
            Control1..1
            Typestring
            Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
            38. vnHealthCheckupG12EnvelopeLm.header.msgType
            Definition

            msg_type - REQUEST cố định = 101 (thông điệp phát tin đồng bộ). Response dùng 102 (xem nhóm response bên dưới)

            Shortmsg_type - REQUEST cố định = 101 (thông điệp phát tin đồng bộ). Response dùng 102 (xem nhóm response bên dưới)
            Control1..1
            Typestring
            Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
            40. vnHealthCheckupG12EnvelopeLm.header.dataType
            Definition

            data_type - Định dạng file. Giá trị: xml/base64 (Phụ lục 03)

            Shortdata_type - Định dạng file. Giá trị: xml/base64 (Phụ lục 03)
            Control1..1
            Typestring
            Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
            42. vnHealthCheckupG12EnvelopeLm.header.sendDatetime
            Definition

            send_datetime - Thời điểm đẩy dữ liệu, Unix timestamp 13 số (ms). VĂN BẢN GỐC kiểu Long; mô hình hóa string vì vượt phạm vi FHIR R4 integer 32-bit (INFORMATIVE)

            Shortsend_datetime - Thời điểm đẩy dữ liệu, Unix timestamp 13 số (ms). VĂN BẢN GỐC kiểu Long; mô hình hóa string vì vượt phạm vi FHIR R4 integer 32-bit (INFORMATIVE)
            Control1..1
            Typestring
            Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
            44. vnHealthCheckupG12EnvelopeLm.data
            Definition

            data - File dữ liệu (XML hồ sơ sức khỏe mẫu GIAMDINHHS QĐ 3176/QĐ-BYT) đã encode Base64. VĂN BẢN GỐC ghi Object ở bảng request nhưng phần checksum ghi STRING BASE64 (văn bản tự mâu thuẫn) — mô hình hóa string base64. Bắt buộc trong thực tế dù bảng gốc không đánh dấu 'x'

            Shortdata - File dữ liệu (XML hồ sơ sức khỏe mẫu GIAMDINHHS QĐ 3176/QĐ-BYT) đã encode Base64. VĂN BẢN GỐC ghi Object ở bảng request nhưng phần checksum ghi STRING BASE64 (văn bản tự mâu thuẫn) — mô hình hóa string base64. Bắt buộc trong thực tế dù bảng gốc không đánh dấu 'x'
            Control1..1
            Typestring
            Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
            46. vnHealthCheckupG12EnvelopeLm.signature
            Definition

            signature - Chữ ký số checksum RSASHA256 giữa header và data (bên phát tin tạo). Công thức: bỏ whitespace/newline → Uppercase(SHA256(header)) + '.' + Uppercase(SHA256(data)) → RSASHA256 bằng private key → Uppercase(base64). Bắt buộc trong thực tế dù bảng gốc không đánh dấu 'x'

            Shortsignature - Chữ ký số checksum RSASHA256 giữa header và data (bên phát tin tạo). Công thức: bỏ whitespace/newline → Uppercase(SHA256(header)) + '.' + Uppercase(SHA256(data)) → RSASHA256 bằng private key → Uppercase(base64). Bắt buộc trong thực tế dù bảng gốc không đánh dấu 'x'
            Control1..1
            Typestring
            Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
            48. vnHealthCheckupG12EnvelopeLm.response
            Definition

            Bản tin phản hồi từ Trục BYT (msg_type=102)

            ShortBản tin phản hồi từ Trục BYT (msg_type=102)
            Control0..1
            TypeBackboneElement
            Invariantsele-1: All FHIR elements must have a @value or children (hasValue() or (children().count() > id.count()))
            50. vnHealthCheckupG12EnvelopeLm.response.id
            Definition

            Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.

            ShortUnique id for inter-element referencing
            Control0..1
            Typestring
            Is Modifierfalse
            XML FormatIn the XML format, this property is represented as an attribute.
            Summaryfalse
            52. vnHealthCheckupG12EnvelopeLm.response.extension
            Definition

            May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.

            ShortAdditional content defined by implementations
            Comments

            There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.

            Control0..*
            TypeExtension
            Is Modifierfalse
            Summaryfalse
            Alternate Namesextensions, user content
            Invariantsele-1: All FHIR elements must have a @value or children (hasValue() or (children().count() > id.count()))
            ext-1: Must have either extensions or value[x], not both (extension.exists() != value.exists())
            SlicingThis element introduces a set of slices on vnHealthCheckupG12EnvelopeLm.response.extension. The slices areUnordered and Open, and can be differentiated using the following discriminators:
            • value @ url
            • 54. vnHealthCheckupG12EnvelopeLm.response.modifierExtension
              Definition

              May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.

              Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).

              ShortExtensions that cannot be ignored even if unrecognized
              Comments

              There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.

              Control0..*
              TypeExtension
              Is Modifiertrue because Modifier extensions are expected to modify the meaning or interpretation of the element that contains them
              Summarytrue
              Requirements

              Modifier extensions allow for extensions that cannot be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the definition of modifier extensions.

              Alternate Namesextensions, user content, modifiers
              Invariantsele-1: All FHIR elements must have a @value or children (hasValue() or (children().count() > id.count()))
              ext-1: Must have either extensions or value[x], not both (extension.exists() != value.exists())
              56. vnHealthCheckupG12EnvelopeLm.response.version
              Definition

              version - Phiên bản hệ thống Trục dữ liệu BYT

              Shortversion - Phiên bản hệ thống Trục dữ liệu BYT
              NoteThis is a business version Id, not a resource version Id (see discussion)
              Control0..1
              Typestring
              Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
              58. vnHealthCheckupG12EnvelopeLm.response.senderId
              Definition

              sender_id (response) - Mã bên nhận-nay-phát (ví dụ TDLBYT)

              Shortsender_id (response) - Mã bên nhận-nay-phát (ví dụ TDLBYT)
              Control0..1
              Typestring
              Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
              60. vnHealthCheckupG12EnvelopeLm.response.receiverId
              Definition

              receiver_id (response) - Mã bên phát tin gốc (ví dụ G12/VSS)

              Shortreceiver_id (response) - Mã bên phát tin gốc (ví dụ G12/VSS)
              Control0..1
              Typestring
              Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
              62. vnHealthCheckupG12EnvelopeLm.response.txnType
              Definition

              txn_type (response) = sync_ehr

              Shorttxn_type (response) = sync_ehr
              Control0..1
              Typestring
              Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
              64. vnHealthCheckupG12EnvelopeLm.response.msgType
              Definition

              msg_type (response) = 102

              Shortmsg_type (response) = 102
              Control0..1
              Typestring
              Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
              66. vnHealthCheckupG12EnvelopeLm.response.msgId
              Definition

              msg_id (response) - Mã giao dịch phía Trục (sender_id + YY+MM+DD + UUIDv4)

              Shortmsg_id (response) - Mã giao dịch phía Trục (sender_id + YY+MM+DD + UUIDv4)
              Control0..1
              Typestring
              Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
              68. vnHealthCheckupG12EnvelopeLm.response.refMsgId
              Definition

              ref_msg_id - msg_id của bên phát tin gốc

              Shortref_msg_id - msg_id của bên phát tin gốc
              Control0..1
              Typestring
              Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
              70. vnHealthCheckupG12EnvelopeLm.response.sendDatetime
              Definition

              send_datetime (response) - Unix timestamp 13 số

              Shortsend_datetime (response) - Unix timestamp 13 số
              Control0..1
              Typestring
              Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
              72. vnHealthCheckupG12EnvelopeLm.response.resDatetime
              Definition

              res_datetime - Ngày phản hồi (Unix timestamp 13 số)

              Shortres_datetime - Ngày phản hồi (Unix timestamp 13 số)
              Control0..1
              Typestring
              Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
              74. vnHealthCheckupG12EnvelopeLm.response.resCode
              Definition

              res_code - Mã trạng thái tiếp nhận (CM_SUCCESS | CM_INVALID_REQUEST | PS_DS_RSA_SIGNATURE_INVALID/MISSING | PS_DS_CA_SIGNATURE_INVALID/MISSING | PS_DS_VERIFY_SUCCESS/FAIL | PS_DS_SAVE_SUCCESS/FAIL)

              Shortres_code - Mã trạng thái tiếp nhận (CM_SUCCESS | CM_INVALID_REQUEST | PS_DS_RSA_SIGNATURE_INVALID/MISSING | PS_DS_CA_SIGNATURE_INVALID/MISSING | PS_DS_VERIFY_SUCCESS/FAIL | PS_DS_SAVE_SUCCESS/FAIL)
              Control0..1
              Typestring
              Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
              76. vnHealthCheckupG12EnvelopeLm.response.resMsg
              Definition

              res_msg - Diễn giải trạng thái tiếp nhận

              Shortres_msg - Diễn giải trạng thái tiếp nhận
              Control0..1
              Typestring
              Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
              78. vnHealthCheckupG12EnvelopeLm.response.dataState
              Definition

              data.data_state - Mã trạng thái dữ liệu sau khi về kho

              Shortdata.data_state - Mã trạng thái dữ liệu sau khi về kho
              Control0..1
              Typestring
              Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
              80. vnHealthCheckupG12EnvelopeLm.response.dataStateMsg
              Definition

              data.data_state_msg - Chi tiết trạng thái dữ liệu (vd 'Data is received')

              Shortdata.data_state_msg - Chi tiết trạng thái dữ liệu (vd 'Data is received')
              Control0..1
              Typestring
              Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
              82. vnHealthCheckupG12EnvelopeLm.response.messageCheckCa
              Definition

              data.message_check_ca - Trạng thái kiểm tra chữ ký số bản tin

              Shortdata.message_check_ca - Trạng thái kiểm tra chữ ký số bản tin
              Control0..1
              Typestring
              Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
              84. vnHealthCheckupG12EnvelopeLm.response.messageNotify
              Definition

              data.message_notify - Trạng thái hệ thống với bản tin (vd 'Successfully inserted data to DATA LAKE')

              Shortdata.message_notify - Trạng thái hệ thống với bản tin (vd 'Successfully inserted data to DATA LAKE')
              Control0..1
              Typestring
              Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
              86. vnHealthCheckupG12EnvelopeLm.response.signature
              Definition

              signature (response) - Chữ ký RSASHA256 của bên nhận tin (Trục BYT)

              Shortsignature (response) - Chữ ký RSASHA256 của bên nhận tin (Trục BYT)
              Control0..1
              Typestring
              Primitive ValueThis primitive element may be present, or absent, or replaced by an extension