Hướng dẫn triển khai FHIR cốt lõi Việt Nam — VN Core FHIR Implementation Guide
0.10.0 - Draft for Community Review
Hướng dẫn triển khai FHIR cốt lõi Việt Nam — VN Core FHIR Implementation Guide - Draft for Community Review (v0.10.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions
| URL chính thức: http://fhir.hl7.org.vn/core/StructureDefinition/vnPharmacyStockOutLm | Phiên bản: 0.10.0 | ||||
| Computable Name: VNPharmacyStockOutLM | |||||
| Định danh khác: OID:2.25.161089673617632664299011809196868855799.42.222 | |||||
Logical model cho payload phiếu xuất hàng gửi lên Hệ thống cơ sở dữ liệu về dược (POST /transactions/stock-out, API v1.1 mục 5.4.4). Bao trùm cả nghiệp vụ BÁN LẺ THUỐC (reason=sale-retail — v1.1 đã bỏ nhóm API hoá đơn /invoices của v1.0, bán lẻ chỉ còn liên thông qua stock-out): với bán lẻ theo đơn, đích FHIR chủ đạo là VNCoreMedicationDispense; với các nghiệp vụ kho khác là SupplyDelivery. reason=recall gắn trực tiếp quy trình thu hồi thuốc theo TT 30/2025/TT-BYT.
Usages:
You can also check for usages in the FHIR IG Statistics
Mô tả profile, differential, snapshot và các biểu diễn liên quan.
| Name | Flags | Card. | Type | Description & Constraints Filter: ![]() ![]() |
|---|---|---|---|---|
![]() |
0..* | Base | Phiếu xuất hàng CSDL Dược — Logical Model | |
![]() ![]() |
C | 1..1 | string | transaction_date - Ngày/giờ xuất hàng (GMT+7 không ghi offset — mục 6.3.1) Constraints: vn-pharmacy-wire-datetime-format |
![]() ![]() |
1..1 | code | reason - Loại phiếu xuất/Lý do xuất (mục 6.4.2; tối đa 20 ký tự) | |
![]() ![]() |
0..1 | string | source_store_id - Mã chi nhánh xuất hàng (chuỗi nhà thuốc, reason=transfer-out) | |
![]() ![]() |
0..1 | string | source_warehouse_id - Mã kho xuất (reason=transfer-out) | |
![]() ![]() |
0..1 | string | target_store_id - Mã chi nhánh nhập hàng (reason=transfer-out) | |
![]() ![]() |
0..1 | string | target_warehouse_id - Mã kho nhập (reason=transfer-out) | |
![]() ![]() |
0..1 | string | supplier_id - Mã định danh nhà cung cấp (reason=return — xuất trả nhà cung cấp) | |
![]() ![]() |
1..1 | string | reference_number - Số chứng từ xuất hàng | |
![]() ![]() |
0..1 | string | practice_license_code - Số GCN đủ điều kiện sản xuất/kinh doanh thuốc của chi nhánh (bổ sung ở v1.1; tài khoản cơ sở chính đẩy hộ thành viên chuỗi) | |
![]() ![]() |
0..1 | string | note - Ghi chú (tối đa 500 ký tự) | |
![]() ![]() |
1..* | BackboneElement | items[] - Danh sách thuốc trong phiếu xuất | |
![]() ![]() ![]() |
1..1 | string | items[].drug_id - Mã định danh thuốc (bắt buộc — validator trả lỗi khi để trống) | |
![]() ![]() ![]() |
1..1 | string | items[].unit_id - Mã đơn vị tính (bắt buộc — validator trả lỗi khi để trống) | |
![]() ![]() ![]() |
1..1 | integer | items[].quantity - Số lượng | |
![]() ![]() ![]() |
1..1 | string | items[].batch_no - Số lô sản xuất (tối đa 20 ký tự) | |
![]() ![]() ![]() |
0..1 | string | items[].packaging_specifications - Quy cách đóng gói (bổ sung ở v1.1) | |
![]() ![]() ![]() |
1..1 | date | items[].expiry_date - Hạn sử dụng của lô | |
![]() ![]() ![]() |
0..1 | string | items[].manufacturer.id - Mã nhà sản xuất | |
![]() ![]() ![]() |
0..1 | string | items[].manufacturer.name - Tên nhà sản xuất (tối đa 200 ký tự) | |
![]() ![]() ![]() |
0..1 | string | items[].manufacturer.country - Mã quốc gia sản xuất (ISO-3166) | |
![]() ![]() ![]() |
0..1 | string | items[].gtin - Mã GTIN theo cấp độ đóng gói | |
![]() ![]() ![]() |
0..1 | decimal | items[].price - Đơn giá xuất (2 chữ số thập phân) | |
![]() ![]() |
0..1 | string | transaction_id — Mã giao dịch do hệ thống cấp trong response | |
![]() ![]() |
0..1 | code | status — Trạng thái xử lý bất đồng bộ (mục 6.2: accepted | processing | completed | error | rejected) | |
Documentation for this format | ||||
| Id | Grade | Path(s) | Description | Expression |
| vn-pharmacy-wire-datetime-format | error | vnPharmacyStockOutLm.transactionDate | Ngày giờ giao dịch phải đúng chuỗi YYYY-MM-DDThh:mm:ss, không có offset. Transaction datetime SHALL use the published offset-free YYYY-MM-DDThh:mm:ss wire format. |
$this.matches('^[0-9]{4}-[0-9]{2}-[0-9]{2}T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]$')
|
| Name | Flags | Card. | Type | Description & Constraints Filter: ![]() ![]() |
|---|---|---|---|---|
![]() |
0..* | Base | Phiếu xuất hàng CSDL Dược — Logical Model | |
![]() ![]() |
C | 1..1 | string | transaction_date - Ngày/giờ xuất hàng (GMT+7 không ghi offset — mục 6.3.1) Constraints: vn-pharmacy-wire-datetime-format |
![]() ![]() |
1..1 | code | reason - Loại phiếu xuất/Lý do xuất (mục 6.4.2; tối đa 20 ký tự) | |
![]() ![]() |
0..1 | string | source_store_id - Mã chi nhánh xuất hàng (chuỗi nhà thuốc, reason=transfer-out) | |
![]() ![]() |
0..1 | string | source_warehouse_id - Mã kho xuất (reason=transfer-out) | |
![]() ![]() |
0..1 | string | target_store_id - Mã chi nhánh nhập hàng (reason=transfer-out) | |
![]() ![]() |
0..1 | string | target_warehouse_id - Mã kho nhập (reason=transfer-out) | |
![]() ![]() |
0..1 | string | supplier_id - Mã định danh nhà cung cấp (reason=return — xuất trả nhà cung cấp) | |
![]() ![]() |
1..1 | string | reference_number - Số chứng từ xuất hàng | |
![]() ![]() |
0..1 | string | practice_license_code - Số GCN đủ điều kiện sản xuất/kinh doanh thuốc của chi nhánh (bổ sung ở v1.1; tài khoản cơ sở chính đẩy hộ thành viên chuỗi) | |
![]() ![]() |
0..1 | string | note - Ghi chú (tối đa 500 ký tự) | |
![]() ![]() |
1..* | BackboneElement | items[] - Danh sách thuốc trong phiếu xuất | |
![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |
![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |
![]() ![]() ![]() |
?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
![]() ![]() ![]() |
1..1 | string | items[].drug_id - Mã định danh thuốc (bắt buộc — validator trả lỗi khi để trống) | |
![]() ![]() ![]() |
1..1 | string | items[].unit_id - Mã đơn vị tính (bắt buộc — validator trả lỗi khi để trống) | |
![]() ![]() ![]() |
1..1 | integer | items[].quantity - Số lượng | |
![]() ![]() ![]() |
1..1 | string | items[].batch_no - Số lô sản xuất (tối đa 20 ký tự) | |
![]() ![]() ![]() |
0..1 | string | items[].packaging_specifications - Quy cách đóng gói (bổ sung ở v1.1) | |
![]() ![]() ![]() |
1..1 | date | items[].expiry_date - Hạn sử dụng của lô | |
![]() ![]() ![]() |
0..1 | string | items[].manufacturer.id - Mã nhà sản xuất | |
![]() ![]() ![]() |
0..1 | string | items[].manufacturer.name - Tên nhà sản xuất (tối đa 200 ký tự) | |
![]() ![]() ![]() |
0..1 | string | items[].manufacturer.country - Mã quốc gia sản xuất (ISO-3166) | |
![]() ![]() ![]() |
0..1 | string | items[].gtin - Mã GTIN theo cấp độ đóng gói | |
![]() ![]() ![]() |
0..1 | decimal | items[].price - Đơn giá xuất (2 chữ số thập phân) | |
![]() ![]() |
0..1 | string | transaction_id — Mã giao dịch do hệ thống cấp trong response | |
![]() ![]() |
0..1 | code | status — Trạng thái xử lý bất đồng bộ (mục 6.2: accepted | processing | completed | error | rejected) | |
Documentation for this format | ||||
| Id | Grade | Path(s) | Description | Expression |
| ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children |
hasValue() or (children().count() > id.count())
|
| ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both |
extension.exists() != value.exists()
|
| vn-pharmacy-wire-datetime-format | error | vnPharmacyStockOutLm.transactionDate | Ngày giờ giao dịch phải đúng chuỗi YYYY-MM-DDThh:mm:ss, không có offset. Transaction datetime SHALL use the published offset-free YYYY-MM-DDThh:mm:ss wire format. |
$this.matches('^[0-9]{4}-[0-9]{2}-[0-9]{2}T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]$')
|
Dạng xem Differential
| Name | Flags | Card. | Type | Description & Constraints Filter: ![]() ![]() |
|---|---|---|---|---|
![]() |
0..* | Base | Phiếu xuất hàng CSDL Dược — Logical Model | |
![]() ![]() |
C | 1..1 | string | transaction_date - Ngày/giờ xuất hàng (GMT+7 không ghi offset — mục 6.3.1) Constraints: vn-pharmacy-wire-datetime-format |
![]() ![]() |
1..1 | code | reason - Loại phiếu xuất/Lý do xuất (mục 6.4.2; tối đa 20 ký tự) | |
![]() ![]() |
0..1 | string | source_store_id - Mã chi nhánh xuất hàng (chuỗi nhà thuốc, reason=transfer-out) | |
![]() ![]() |
0..1 | string | source_warehouse_id - Mã kho xuất (reason=transfer-out) | |
![]() ![]() |
0..1 | string | target_store_id - Mã chi nhánh nhập hàng (reason=transfer-out) | |
![]() ![]() |
0..1 | string | target_warehouse_id - Mã kho nhập (reason=transfer-out) | |
![]() ![]() |
0..1 | string | supplier_id - Mã định danh nhà cung cấp (reason=return — xuất trả nhà cung cấp) | |
![]() ![]() |
1..1 | string | reference_number - Số chứng từ xuất hàng | |
![]() ![]() |
0..1 | string | practice_license_code - Số GCN đủ điều kiện sản xuất/kinh doanh thuốc của chi nhánh (bổ sung ở v1.1; tài khoản cơ sở chính đẩy hộ thành viên chuỗi) | |
![]() ![]() |
0..1 | string | note - Ghi chú (tối đa 500 ký tự) | |
![]() ![]() |
1..* | BackboneElement | items[] - Danh sách thuốc trong phiếu xuất | |
![]() ![]() ![]() |
1..1 | string | items[].drug_id - Mã định danh thuốc (bắt buộc — validator trả lỗi khi để trống) | |
![]() ![]() ![]() |
1..1 | string | items[].unit_id - Mã đơn vị tính (bắt buộc — validator trả lỗi khi để trống) | |
![]() ![]() ![]() |
1..1 | integer | items[].quantity - Số lượng | |
![]() ![]() ![]() |
1..1 | string | items[].batch_no - Số lô sản xuất (tối đa 20 ký tự) | |
![]() ![]() ![]() |
0..1 | string | items[].packaging_specifications - Quy cách đóng gói (bổ sung ở v1.1) | |
![]() ![]() ![]() |
1..1 | date | items[].expiry_date - Hạn sử dụng của lô | |
![]() ![]() ![]() |
0..1 | string | items[].manufacturer.id - Mã nhà sản xuất | |
![]() ![]() ![]() |
0..1 | string | items[].manufacturer.name - Tên nhà sản xuất (tối đa 200 ký tự) | |
![]() ![]() ![]() |
0..1 | string | items[].manufacturer.country - Mã quốc gia sản xuất (ISO-3166) | |
![]() ![]() ![]() |
0..1 | string | items[].gtin - Mã GTIN theo cấp độ đóng gói | |
![]() ![]() ![]() |
0..1 | decimal | items[].price - Đơn giá xuất (2 chữ số thập phân) | |
![]() ![]() |
0..1 | string | transaction_id — Mã giao dịch do hệ thống cấp trong response | |
![]() ![]() |
0..1 | code | status — Trạng thái xử lý bất đồng bộ (mục 6.2: accepted | processing | completed | error | rejected) | |
Documentation for this format | ||||
| Id | Grade | Path(s) | Description | Expression |
| vn-pharmacy-wire-datetime-format | error | vnPharmacyStockOutLm.transactionDate | Ngày giờ giao dịch phải đúng chuỗi YYYY-MM-DDThh:mm:ss, không có offset. Transaction datetime SHALL use the published offset-free YYYY-MM-DDThh:mm:ss wire format. |
$this.matches('^[0-9]{4}-[0-9]{2}-[0-9]{2}T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]$')
|
Dạng xem SnapshotView
| Name | Flags | Card. | Type | Description & Constraints Filter: ![]() ![]() |
|---|---|---|---|---|
![]() |
0..* | Base | Phiếu xuất hàng CSDL Dược — Logical Model | |
![]() ![]() |
C | 1..1 | string | transaction_date - Ngày/giờ xuất hàng (GMT+7 không ghi offset — mục 6.3.1) Constraints: vn-pharmacy-wire-datetime-format |
![]() ![]() |
1..1 | code | reason - Loại phiếu xuất/Lý do xuất (mục 6.4.2; tối đa 20 ký tự) | |
![]() ![]() |
0..1 | string | source_store_id - Mã chi nhánh xuất hàng (chuỗi nhà thuốc, reason=transfer-out) | |
![]() ![]() |
0..1 | string | source_warehouse_id - Mã kho xuất (reason=transfer-out) | |
![]() ![]() |
0..1 | string | target_store_id - Mã chi nhánh nhập hàng (reason=transfer-out) | |
![]() ![]() |
0..1 | string | target_warehouse_id - Mã kho nhập (reason=transfer-out) | |
![]() ![]() |
0..1 | string | supplier_id - Mã định danh nhà cung cấp (reason=return — xuất trả nhà cung cấp) | |
![]() ![]() |
1..1 | string | reference_number - Số chứng từ xuất hàng | |
![]() ![]() |
0..1 | string | practice_license_code - Số GCN đủ điều kiện sản xuất/kinh doanh thuốc của chi nhánh (bổ sung ở v1.1; tài khoản cơ sở chính đẩy hộ thành viên chuỗi) | |
![]() ![]() |
0..1 | string | note - Ghi chú (tối đa 500 ký tự) | |
![]() ![]() |
1..* | BackboneElement | items[] - Danh sách thuốc trong phiếu xuất | |
![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |
![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |
![]() ![]() ![]() |
?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
![]() ![]() ![]() |
1..1 | string | items[].drug_id - Mã định danh thuốc (bắt buộc — validator trả lỗi khi để trống) | |
![]() ![]() ![]() |
1..1 | string | items[].unit_id - Mã đơn vị tính (bắt buộc — validator trả lỗi khi để trống) | |
![]() ![]() ![]() |
1..1 | integer | items[].quantity - Số lượng | |
![]() ![]() ![]() |
1..1 | string | items[].batch_no - Số lô sản xuất (tối đa 20 ký tự) | |
![]() ![]() ![]() |
0..1 | string | items[].packaging_specifications - Quy cách đóng gói (bổ sung ở v1.1) | |
![]() ![]() ![]() |
1..1 | date | items[].expiry_date - Hạn sử dụng của lô | |
![]() ![]() ![]() |
0..1 | string | items[].manufacturer.id - Mã nhà sản xuất | |
![]() ![]() ![]() |
0..1 | string | items[].manufacturer.name - Tên nhà sản xuất (tối đa 200 ký tự) | |
![]() ![]() ![]() |
0..1 | string | items[].manufacturer.country - Mã quốc gia sản xuất (ISO-3166) | |
![]() ![]() ![]() |
0..1 | string | items[].gtin - Mã GTIN theo cấp độ đóng gói | |
![]() ![]() ![]() |
0..1 | decimal | items[].price - Đơn giá xuất (2 chữ số thập phân) | |
![]() ![]() |
0..1 | string | transaction_id — Mã giao dịch do hệ thống cấp trong response | |
![]() ![]() |
0..1 | code | status — Trạng thái xử lý bất đồng bộ (mục 6.2: accepted | processing | completed | error | rejected) | |
Documentation for this format | ||||
| Id | Grade | Path(s) | Description | Expression |
| ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children |
hasValue() or (children().count() > id.count())
|
| ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both |
extension.exists() != value.exists()
|
| vn-pharmacy-wire-datetime-format | error | vnPharmacyStockOutLm.transactionDate | Ngày giờ giao dịch phải đúng chuỗi YYYY-MM-DDThh:mm:ss, không có offset. Transaction datetime SHALL use the published offset-free YYYY-MM-DDThh:mm:ss wire format. |
$this.matches('^[0-9]{4}-[0-9]{2}-[0-9]{2}T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]$')
|