Hướng dẫn triển khai FHIR cốt lõi Việt Nam — VN Core FHIR Implementation Guide
0.9.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 - Local Development build (v0.9.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions
| Draft tại thời điểm 2026-07-31 |
Các định nghĩa cho vnPharmacyStockInLm mô hình logic
Guidance on how to interpret the contents of this table can be foundhere
| 0. vnPharmacyStockInLm | |
| Definition | Logical model cho payload phiếu nhập hàng gửi lên Hệ thống cơ sở dữ liệu về dược (POST /transactions/stock-in, API v1.1 mục 5.4.1). Áp dụng cho nhà thuốc/quầy thuốc (kể cả nhà thuốc bệnh viện), chuỗi nhà thuốc, cơ sở bán buôn, xuất/nhập khẩu. Xử lý bất đồng bộ: hệ thống trả transaction_id, phần mềm poll GET /transactions/stock-in/{id}/status (enum mục 6.2: accepted/processing/completed/error/rejected). Ràng buộc onboarding: cơ sở phải khai báo phiếu nhập tồn đầu kỳ (reason=opening-balance) trước khi liên thông giao dịch khác. |
| Short | Phiếu nhập hàng CSDL Dược — Logical Model |
| Control | 0..* |
| Is Modifier | false |
| Logical Model | Instances of this logical model are not marked to be the target of a Reference |
| 2. vnPharmacyStockInLm.transactionDate | |
| Definition | transaction_date — Ngày/giờ nhập hàng (định dạng YYYY-MM-DDThh:mm:ss, múi giờ GMT+7 không ghi offset — mục 6.3.1) |
| Short | transaction_date — Ngày/giờ nhập hàng (định dạng YYYY-MM-DDThh:mm:ss, múi giờ GMT+7 không ghi offset — mục 6.3.1) |
| Control | 1..1 |
| Type | dateTime |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 4. vnPharmacyStockInLm.reason | |
| Definition | reason — Loại phiếu nhập/Lý do nhập (mục 6.4.1; tối đa 20 ký tự) |
| Short | reason — Loại phiếu nhập/Lý do nhập (mục 6.4.1; tối đa 20 ký tự) |
| Comments | Cơ sở bán lẻ: supplier | return | opening-balance | other. Cơ sở khác thêm: transfer-in | manufactured | imported. Giá trị supplier bắt buộc kèm supplier_id; transfer-in bắt buộc kèm cặp source_/target_. |
| Control | 1..1 |
| Type | code |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 6. vnPharmacyStockInLm.supplierId | |
| Definition | supplier_id — Mã định danh nhà cung cấp (bắt buộc khi reason=supplier) |
| Short | supplier_id — Mã định danh nhà cung cấp (bắt buộc khi reason=supplier) |
| Control | 0..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 8. vnPharmacyStockInLm.sourceStoreId | |
| Definition | source_store_id — Mã chi nhánh xuất hàng (chuỗi nhà thuốc, reason=transfer-in) |
| Short | source_store_id — Mã chi nhánh xuất hàng (chuỗi nhà thuốc, reason=transfer-in) |
| Control | 0..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 10. vnPharmacyStockInLm.sourceWarehouseId | |
| Definition | source_warehouse_id — Mã kho xuất (reason=transfer-in) |
| Short | source_warehouse_id — Mã kho xuất (reason=transfer-in) |
| Control | 0..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 12. vnPharmacyStockInLm.targetStoreId | |
| Definition | target_store_id — Mã chi nhánh nhập hàng (chuỗi nhà thuốc, reason=transfer-in) |
| Short | target_store_id — Mã chi nhánh nhập hàng (chuỗi nhà thuốc, reason=transfer-in) |
| Control | 0..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 14. vnPharmacyStockInLm.targetWarehouseId | |
| Definition | target_warehouse_id — Mã kho nhập (reason=transfer-in) |
| Short | target_warehouse_id — Mã kho nhập (reason=transfer-in) |
| Control | 0..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 16. vnPharmacyStockInLm.referenceNumber | |
| Definition | reference_number — Số chứng từ nhập hàng |
| Short | reference_number — Số chứng từ nhập hàng |
| Control | 1..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 18. vnPharmacyStockInLm.practiceLicenseCode | |
| Definition | 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; dùng khi tài khoản cơ sở chính đẩy dữ liệu hộ cơ sở thành viên chuỗi) |
| Short | 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; dùng khi tài khoản cơ sở chính đẩy dữ liệu hộ cơ sở thành viên chuỗi) |
| Control | 0..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 20. vnPharmacyStockInLm.note | |
| Definition | note — Ghi chú (tối đa 500 ký tự) |
| Short | note — Ghi chú (tối đa 500 ký tự) |
| Control | 0..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 22. vnPharmacyStockInLm.item | |
| Definition | items[] — Danh sách thuốc trong phiếu nhập |
| Short | items[] — Danh sách thuốc trong phiếu nhập |
| Control | 1..* |
| Type | BackboneElement |
| Invariants | ele-1: All FHIR elements must have a @value or children (hasValue() or (children().count() > id.count())) |
| 24. vnPharmacyStockInLm.item.id | |
| Definition | Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. |
| Short | Unique id for inter-element referencing |
| Control | 0..1 |
| Type | string |
| Is Modifier | false |
| XML Format | In the XML format, this property is represented as an attribute. |
| Summary | false |
| 26. vnPharmacyStockInLm.item.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. |
| Short | Additional 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. |
| Control | 0..* |
| Type | Extension |
| Is Modifier | false |
| Summary | false |
| Alternate Names | extensions, user content |
| Invariants | ele-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()) |
| Slicing | This element introduces a set of slices on vnPharmacyStockInLm.item.extension. The slices areUnordered and Open, and can be differentiated using the following discriminators: |
| 28. vnPharmacyStockInLm.item.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). |
| Short | Extensions 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. |
| Control | 0..* |
| Type | Extension |
| Is Modifier | true because Modifier extensions are expected to modify the meaning or interpretation of the element that contains them |
| Summary | true |
| 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 Names | extensions, user content, modifiers |
| Invariants | ele-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()) |
| 30. vnPharmacyStockInLm.item.drugId | |
| Definition | items[].drug_id — Mã định danh thuốc (bắt buộc — validator hệ thống trả lỗi 'Mã định danh thuốc không được để trống') |
| Short | items[].drug_id — Mã định danh thuốc (bắt buộc — validator hệ thống trả lỗi 'Mã định danh thuốc không được để trống') |
| Control | 1..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 32. vnPharmacyStockInLm.item.unitId | |
| Definition | items[].unit_id — Mã đơn vị tính (bắt buộc — validator hệ thống trả lỗi 'Mã đơn vị tính không được để trống') |
| Short | items[].unit_id — Mã đơn vị tính (bắt buộc — validator hệ thống trả lỗi 'Mã đơn vị tính không được để trống') |
| Control | 1..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 34. vnPharmacyStockInLm.item.quantity | |
| Definition | items[].quantity — Số lượng |
| Short | items[].quantity — Số lượng |
| Control | 1..1 |
| Type | integer |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 36. vnPharmacyStockInLm.item.batchNo | |
| Definition | items[].batch_no — Số lô sản xuất |
| Short | items[].batch_no — Số lô sản xuất |
| Control | 1..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 38. vnPharmacyStockInLm.item.packagingSpecifications | |
| Definition | items[].packaging_specifications — Quy cách đóng gói (bổ sung ở v1.1) |
| Short | items[].packaging_specifications — Quy cách đóng gói (bổ sung ở v1.1) |
| Control | 0..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 40. vnPharmacyStockInLm.item.expiryDate | |
| Definition | items[].expiry_date — Hạn sử dụng của lô |
| Short | items[].expiry_date — Hạn sử dụng của lô |
| Control | 1..1 |
| Type | date |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 42. vnPharmacyStockInLm.item.manufacturerId | |
| Definition | items[].manufacturer.id — Mã nhà sản xuất |
| Short | items[].manufacturer.id — Mã nhà sản xuất |
| Control | 0..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 44. vnPharmacyStockInLm.item.manufacturerName | |
| Definition | items[].manufacturer.name — Tên nhà sản xuất (tối đa 200 ký tự) |
| Short | items[].manufacturer.name — Tên nhà sản xuất (tối đa 200 ký tự) |
| Control | 0..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 46. vnPharmacyStockInLm.item.manufacturerCountry | |
| Definition | items[].manufacturer.country — Mã quốc gia sản xuất (tối đa 5 ký tự, ISO-3166) |
| Short | items[].manufacturer.country — Mã quốc gia sản xuất (tối đa 5 ký tự, ISO-3166) |
| Control | 0..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 48. vnPharmacyStockInLm.item.gtin | |
| Definition | items[].gtin — Mã GTIN theo cấp độ đóng gói |
| Short | items[].gtin — Mã GTIN theo cấp độ đóng gói |
| Control | 0..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 50. vnPharmacyStockInLm.item.price | |
| Definition | items[].price — Đơn giá nhập (2 chữ số thập phân) |
| Short | items[].price — Đơn giá nhập (2 chữ số thập phân) |
| Control | 0..1 |
| Type | decimal |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 52. vnPharmacyStockInLm.transactionId | |
| Definition | transaction_id — Mã giao dịch do hệ thống cấp trong response (dùng để poll trạng thái xử lý) |
| Short | transaction_id — Mã giao dịch do hệ thống cấp trong response (dùng để poll trạng thái xử lý) |
| Control | 0..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 54. vnPharmacyStockInLm.processingStatus | |
| Definition | status — Trạng thái xử lý bất đồng bộ của hệ thống (mục 6.2: accepted | processing | completed | error | rejected) |
| Short | status — Trạng thái xử lý bất đồng bộ của hệ thống (mục 6.2: accepted | processing | completed | error | rejected) |
| Control | 0..1 |
| Type | code |
| Primitive Value | This 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. vnPharmacyStockInLm | |
| Definition | Logical model cho payload phiếu nhập hàng gửi lên Hệ thống cơ sở dữ liệu về dược (POST /transactions/stock-in, API v1.1 mục 5.4.1). Áp dụng cho nhà thuốc/quầy thuốc (kể cả nhà thuốc bệnh viện), chuỗi nhà thuốc, cơ sở bán buôn, xuất/nhập khẩu. Xử lý bất đồng bộ: hệ thống trả transaction_id, phần mềm poll GET /transactions/stock-in/{id}/status (enum mục 6.2: accepted/processing/completed/error/rejected). Ràng buộc onboarding: cơ sở phải khai báo phiếu nhập tồn đầu kỳ (reason=opening-balance) trước khi liên thông giao dịch khác. |
| Short | Phiếu nhập hàng CSDL Dược — Logical Model |
| Logical Model | Instances of this logical model are not marked to be the target of a Reference |
| 2. vnPharmacyStockInLm.transactionDate | |
| Definition | transaction_date — Ngày/giờ nhập hàng (định dạng YYYY-MM-DDThh:mm:ss, múi giờ GMT+7 không ghi offset — mục 6.3.1) |
| Short | transaction_date — Ngày/giờ nhập hàng (định dạng YYYY-MM-DDThh:mm:ss, múi giờ GMT+7 không ghi offset — mục 6.3.1) |
| Control | 1..1 |
| Type | dateTime |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 4. vnPharmacyStockInLm.reason | |
| Definition | reason — Loại phiếu nhập/Lý do nhập (mục 6.4.1; tối đa 20 ký tự) |
| Short | reason — Loại phiếu nhập/Lý do nhập (mục 6.4.1; tối đa 20 ký tự) |
| Comments | Cơ sở bán lẻ: supplier | return | opening-balance | other. Cơ sở khác thêm: transfer-in | manufactured | imported. Giá trị supplier bắt buộc kèm supplier_id; transfer-in bắt buộc kèm cặp source_/target_. |
| Control | 1..1 |
| Type | code |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 6. vnPharmacyStockInLm.supplierId | |
| Definition | supplier_id — Mã định danh nhà cung cấp (bắt buộc khi reason=supplier) |
| Short | supplier_id — Mã định danh nhà cung cấp (bắt buộc khi reason=supplier) |
| Control | 0..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 8. vnPharmacyStockInLm.sourceStoreId | |
| Definition | source_store_id — Mã chi nhánh xuất hàng (chuỗi nhà thuốc, reason=transfer-in) |
| Short | source_store_id — Mã chi nhánh xuất hàng (chuỗi nhà thuốc, reason=transfer-in) |
| Control | 0..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 10. vnPharmacyStockInLm.sourceWarehouseId | |
| Definition | source_warehouse_id — Mã kho xuất (reason=transfer-in) |
| Short | source_warehouse_id — Mã kho xuất (reason=transfer-in) |
| Control | 0..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 12. vnPharmacyStockInLm.targetStoreId | |
| Definition | target_store_id — Mã chi nhánh nhập hàng (chuỗi nhà thuốc, reason=transfer-in) |
| Short | target_store_id — Mã chi nhánh nhập hàng (chuỗi nhà thuốc, reason=transfer-in) |
| Control | 0..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 14. vnPharmacyStockInLm.targetWarehouseId | |
| Definition | target_warehouse_id — Mã kho nhập (reason=transfer-in) |
| Short | target_warehouse_id — Mã kho nhập (reason=transfer-in) |
| Control | 0..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 16. vnPharmacyStockInLm.referenceNumber | |
| Definition | reference_number — Số chứng từ nhập hàng |
| Short | reference_number — Số chứng từ nhập hàng |
| Control | 1..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 18. vnPharmacyStockInLm.practiceLicenseCode | |
| Definition | 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; dùng khi tài khoản cơ sở chính đẩy dữ liệu hộ cơ sở thành viên chuỗi) |
| Short | 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; dùng khi tài khoản cơ sở chính đẩy dữ liệu hộ cơ sở thành viên chuỗi) |
| Control | 0..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 20. vnPharmacyStockInLm.note | |
| Definition | note — Ghi chú (tối đa 500 ký tự) |
| Short | note — Ghi chú (tối đa 500 ký tự) |
| Control | 0..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 22. vnPharmacyStockInLm.item | |
| Definition | items[] — Danh sách thuốc trong phiếu nhập |
| Short | items[] — Danh sách thuốc trong phiếu nhập |
| Control | 1..* |
| Type | BackboneElement |
| 24. vnPharmacyStockInLm.item.drugId | |
| Definition | items[].drug_id — Mã định danh thuốc (bắt buộc — validator hệ thống trả lỗi 'Mã định danh thuốc không được để trống') |
| Short | items[].drug_id — Mã định danh thuốc (bắt buộc — validator hệ thống trả lỗi 'Mã định danh thuốc không được để trống') |
| Control | 1..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 26. vnPharmacyStockInLm.item.unitId | |
| Definition | items[].unit_id — Mã đơn vị tính (bắt buộc — validator hệ thống trả lỗi 'Mã đơn vị tính không được để trống') |
| Short | items[].unit_id — Mã đơn vị tính (bắt buộc — validator hệ thống trả lỗi 'Mã đơn vị tính không được để trống') |
| Control | 1..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 28. vnPharmacyStockInLm.item.quantity | |
| Definition | items[].quantity — Số lượng |
| Short | items[].quantity — Số lượng |
| Control | 1..1 |
| Type | integer |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 30. vnPharmacyStockInLm.item.batchNo | |
| Definition | items[].batch_no — Số lô sản xuất |
| Short | items[].batch_no — Số lô sản xuất |
| Control | 1..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 32. vnPharmacyStockInLm.item.packagingSpecifications | |
| Definition | items[].packaging_specifications — Quy cách đóng gói (bổ sung ở v1.1) |
| Short | items[].packaging_specifications — Quy cách đóng gói (bổ sung ở v1.1) |
| Control | 0..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 34. vnPharmacyStockInLm.item.expiryDate | |
| Definition | items[].expiry_date — Hạn sử dụng của lô |
| Short | items[].expiry_date — Hạn sử dụng của lô |
| Control | 1..1 |
| Type | date |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 36. vnPharmacyStockInLm.item.manufacturerId | |
| Definition | items[].manufacturer.id — Mã nhà sản xuất |
| Short | items[].manufacturer.id — Mã nhà sản xuất |
| Control | 0..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 38. vnPharmacyStockInLm.item.manufacturerName | |
| Definition | items[].manufacturer.name — Tên nhà sản xuất (tối đa 200 ký tự) |
| Short | items[].manufacturer.name — Tên nhà sản xuất (tối đa 200 ký tự) |
| Control | 0..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 40. vnPharmacyStockInLm.item.manufacturerCountry | |
| Definition | items[].manufacturer.country — Mã quốc gia sản xuất (tối đa 5 ký tự, ISO-3166) |
| Short | items[].manufacturer.country — Mã quốc gia sản xuất (tối đa 5 ký tự, ISO-3166) |
| Control | 0..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 42. vnPharmacyStockInLm.item.gtin | |
| Definition | items[].gtin — Mã GTIN theo cấp độ đóng gói |
| Short | items[].gtin — Mã GTIN theo cấp độ đóng gói |
| Control | 0..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 44. vnPharmacyStockInLm.item.price | |
| Definition | items[].price — Đơn giá nhập (2 chữ số thập phân) |
| Short | items[].price — Đơn giá nhập (2 chữ số thập phân) |
| Control | 0..1 |
| Type | decimal |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 46. vnPharmacyStockInLm.transactionId | |
| Definition | transaction_id — Mã giao dịch do hệ thống cấp trong response (dùng để poll trạng thái xử lý) |
| Short | transaction_id — Mã giao dịch do hệ thống cấp trong response (dùng để poll trạng thái xử lý) |
| Control | 0..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 48. vnPharmacyStockInLm.processingStatus | |
| Definition | status — Trạng thái xử lý bất đồng bộ của hệ thống (mục 6.2: accepted | processing | completed | error | rejected) |
| Short | status — Trạng thái xử lý bất đồng bộ của hệ thống (mục 6.2: accepted | processing | completed | error | rejected) |
| Control | 0..1 |
| Type | code |
| Primitive Value | This 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. vnPharmacyStockInLm | |
| Definition | Logical model cho payload phiếu nhập hàng gửi lên Hệ thống cơ sở dữ liệu về dược (POST /transactions/stock-in, API v1.1 mục 5.4.1). Áp dụng cho nhà thuốc/quầy thuốc (kể cả nhà thuốc bệnh viện), chuỗi nhà thuốc, cơ sở bán buôn, xuất/nhập khẩu. Xử lý bất đồng bộ: hệ thống trả transaction_id, phần mềm poll GET /transactions/stock-in/{id}/status (enum mục 6.2: accepted/processing/completed/error/rejected). Ràng buộc onboarding: cơ sở phải khai báo phiếu nhập tồn đầu kỳ (reason=opening-balance) trước khi liên thông giao dịch khác. |
| Short | Phiếu nhập hàng CSDL Dược — Logical Model |
| Control | 0..* |
| Is Modifier | false |
| Logical Model | Instances of this logical model are not marked to be the target of a Reference |
| 2. vnPharmacyStockInLm.transactionDate | |
| Definition | transaction_date — Ngày/giờ nhập hàng (định dạng YYYY-MM-DDThh:mm:ss, múi giờ GMT+7 không ghi offset — mục 6.3.1) |
| Short | transaction_date — Ngày/giờ nhập hàng (định dạng YYYY-MM-DDThh:mm:ss, múi giờ GMT+7 không ghi offset — mục 6.3.1) |
| Control | 1..1 |
| Type | dateTime |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 4. vnPharmacyStockInLm.reason | |
| Definition | reason — Loại phiếu nhập/Lý do nhập (mục 6.4.1; tối đa 20 ký tự) |
| Short | reason — Loại phiếu nhập/Lý do nhập (mục 6.4.1; tối đa 20 ký tự) |
| Comments | Cơ sở bán lẻ: supplier | return | opening-balance | other. Cơ sở khác thêm: transfer-in | manufactured | imported. Giá trị supplier bắt buộc kèm supplier_id; transfer-in bắt buộc kèm cặp source_/target_. |
| Control | 1..1 |
| Type | code |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 6. vnPharmacyStockInLm.supplierId | |
| Definition | supplier_id — Mã định danh nhà cung cấp (bắt buộc khi reason=supplier) |
| Short | supplier_id — Mã định danh nhà cung cấp (bắt buộc khi reason=supplier) |
| Control | 0..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 8. vnPharmacyStockInLm.sourceStoreId | |
| Definition | source_store_id — Mã chi nhánh xuất hàng (chuỗi nhà thuốc, reason=transfer-in) |
| Short | source_store_id — Mã chi nhánh xuất hàng (chuỗi nhà thuốc, reason=transfer-in) |
| Control | 0..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 10. vnPharmacyStockInLm.sourceWarehouseId | |
| Definition | source_warehouse_id — Mã kho xuất (reason=transfer-in) |
| Short | source_warehouse_id — Mã kho xuất (reason=transfer-in) |
| Control | 0..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 12. vnPharmacyStockInLm.targetStoreId | |
| Definition | target_store_id — Mã chi nhánh nhập hàng (chuỗi nhà thuốc, reason=transfer-in) |
| Short | target_store_id — Mã chi nhánh nhập hàng (chuỗi nhà thuốc, reason=transfer-in) |
| Control | 0..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 14. vnPharmacyStockInLm.targetWarehouseId | |
| Definition | target_warehouse_id — Mã kho nhập (reason=transfer-in) |
| Short | target_warehouse_id — Mã kho nhập (reason=transfer-in) |
| Control | 0..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 16. vnPharmacyStockInLm.referenceNumber | |
| Definition | reference_number — Số chứng từ nhập hàng |
| Short | reference_number — Số chứng từ nhập hàng |
| Control | 1..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 18. vnPharmacyStockInLm.practiceLicenseCode | |
| Definition | 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; dùng khi tài khoản cơ sở chính đẩy dữ liệu hộ cơ sở thành viên chuỗi) |
| Short | 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; dùng khi tài khoản cơ sở chính đẩy dữ liệu hộ cơ sở thành viên chuỗi) |
| Control | 0..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 20. vnPharmacyStockInLm.note | |
| Definition | note — Ghi chú (tối đa 500 ký tự) |
| Short | note — Ghi chú (tối đa 500 ký tự) |
| Control | 0..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 22. vnPharmacyStockInLm.item | |
| Definition | items[] — Danh sách thuốc trong phiếu nhập |
| Short | items[] — Danh sách thuốc trong phiếu nhập |
| Control | 1..* |
| Type | BackboneElement |
| Invariants | ele-1: All FHIR elements must have a @value or children (hasValue() or (children().count() > id.count())) |
| 24. vnPharmacyStockInLm.item.id | |
| Definition | Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. |
| Short | Unique id for inter-element referencing |
| Control | 0..1 |
| Type | string |
| Is Modifier | false |
| XML Format | In the XML format, this property is represented as an attribute. |
| Summary | false |
| 26. vnPharmacyStockInLm.item.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. |
| Short | Additional 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. |
| Control | 0..* |
| Type | Extension |
| Is Modifier | false |
| Summary | false |
| Alternate Names | extensions, user content |
| Invariants | ele-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()) |
| Slicing | This element introduces a set of slices on vnPharmacyStockInLm.item.extension. The slices areUnordered and Open, and can be differentiated using the following discriminators: |
| 28. vnPharmacyStockInLm.item.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). |
| Short | Extensions 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. |
| Control | 0..* |
| Type | Extension |
| Is Modifier | true because Modifier extensions are expected to modify the meaning or interpretation of the element that contains them |
| Summary | true |
| 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 Names | extensions, user content, modifiers |
| Invariants | ele-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()) |
| 30. vnPharmacyStockInLm.item.drugId | |
| Definition | items[].drug_id — Mã định danh thuốc (bắt buộc — validator hệ thống trả lỗi 'Mã định danh thuốc không được để trống') |
| Short | items[].drug_id — Mã định danh thuốc (bắt buộc — validator hệ thống trả lỗi 'Mã định danh thuốc không được để trống') |
| Control | 1..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 32. vnPharmacyStockInLm.item.unitId | |
| Definition | items[].unit_id — Mã đơn vị tính (bắt buộc — validator hệ thống trả lỗi 'Mã đơn vị tính không được để trống') |
| Short | items[].unit_id — Mã đơn vị tính (bắt buộc — validator hệ thống trả lỗi 'Mã đơn vị tính không được để trống') |
| Control | 1..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 34. vnPharmacyStockInLm.item.quantity | |
| Definition | items[].quantity — Số lượng |
| Short | items[].quantity — Số lượng |
| Control | 1..1 |
| Type | integer |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 36. vnPharmacyStockInLm.item.batchNo | |
| Definition | items[].batch_no — Số lô sản xuất |
| Short | items[].batch_no — Số lô sản xuất |
| Control | 1..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 38. vnPharmacyStockInLm.item.packagingSpecifications | |
| Definition | items[].packaging_specifications — Quy cách đóng gói (bổ sung ở v1.1) |
| Short | items[].packaging_specifications — Quy cách đóng gói (bổ sung ở v1.1) |
| Control | 0..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 40. vnPharmacyStockInLm.item.expiryDate | |
| Definition | items[].expiry_date — Hạn sử dụng của lô |
| Short | items[].expiry_date — Hạn sử dụng của lô |
| Control | 1..1 |
| Type | date |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 42. vnPharmacyStockInLm.item.manufacturerId | |
| Definition | items[].manufacturer.id — Mã nhà sản xuất |
| Short | items[].manufacturer.id — Mã nhà sản xuất |
| Control | 0..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 44. vnPharmacyStockInLm.item.manufacturerName | |
| Definition | items[].manufacturer.name — Tên nhà sản xuất (tối đa 200 ký tự) |
| Short | items[].manufacturer.name — Tên nhà sản xuất (tối đa 200 ký tự) |
| Control | 0..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 46. vnPharmacyStockInLm.item.manufacturerCountry | |
| Definition | items[].manufacturer.country — Mã quốc gia sản xuất (tối đa 5 ký tự, ISO-3166) |
| Short | items[].manufacturer.country — Mã quốc gia sản xuất (tối đa 5 ký tự, ISO-3166) |
| Control | 0..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 48. vnPharmacyStockInLm.item.gtin | |
| Definition | items[].gtin — Mã GTIN theo cấp độ đóng gói |
| Short | items[].gtin — Mã GTIN theo cấp độ đóng gói |
| Control | 0..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 50. vnPharmacyStockInLm.item.price | |
| Definition | items[].price — Đơn giá nhập (2 chữ số thập phân) |
| Short | items[].price — Đơn giá nhập (2 chữ số thập phân) |
| Control | 0..1 |
| Type | decimal |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 52. vnPharmacyStockInLm.transactionId | |
| Definition | transaction_id — Mã giao dịch do hệ thống cấp trong response (dùng để poll trạng thái xử lý) |
| Short | transaction_id — Mã giao dịch do hệ thống cấp trong response (dùng để poll trạng thái xử lý) |
| Control | 0..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 54. vnPharmacyStockInLm.processingStatus | |
| Definition | status — Trạng thái xử lý bất đồng bộ của hệ thống (mục 6.2: accepted | processing | completed | error | rejected) |
| Short | status — Trạng thái xử lý bất đồng bộ của hệ thống (mục 6.2: accepted | processing | completed | error | rejected) |
| Control | 0..1 |
| Type | code |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |