vn-core-implantable-device
type: StructureDefinition
node role: treeRoot
id:
  v: vn-core-implantable-device
language:
  v: vi
text:
  status:
    v: extensions
  div:
    v: Generated Narrative: StructureDefinition vn-core-implantable-device Name Flags Card. Type Description & Constraints<img src="[binary]" alt="doco" style="background-color: inherit"/> Device <a style="padding-left: 3px; padding-right: 3px; border: 1px maroon solid; font-weight: bold; color: #301212; background-color: #fdf4f4;; padding-left: 3px; padding-right: 3px; border: 1px maroon solid; font-weight: bold; color: #301212; background-color: #fdf4f4;" href="http://hl7.org/fhir/R4/conformance-rules.html#constraints" title="This element has or is affected by constraints ( vn-implant-udi-carrier-content, vn-implant-regnum-class-cd )">C 0..* VNCoreDevice Item used in healthcare Constraints: vn-implant-udi-carrier-content, vn-implant-regnum-class-cd #xD; Slices for extension Content/Rules for all slices #xD; extension:riskClass S 0..1 VNCoreExtDeviceRiskClass Phân loại rủi ro A/B/C/D — Must Support cho thiết bị cấy ghép #xD; extension:registrationNumber S 0..1 VNCoreExtDeviceRegistrationNumber Số lưu hành TBYT — Must Support cho thiết bị cấy ghép C/D #xD; udiCarrier 0..* BackboneElement UDI carrier của thiết bị cấy ghép khi có #xD; carrierAIDC S 0..1 base64Binary UDI automatic identification and data capture #xD; status 1..1 code Trạng thái thiết bị cấy ghép #xD; modelNumber 0..1 string Model / quy cách #xD; type 1..1 CodeableConcept Loại thiết bị cấy ghép #xD; patient 1..1 Reference(Bệnh nhân VN Core — VN Core Patient Profile) Bệnh nhân đang/đã được cấy ghép thiết bị #xD; safety S 0..* CodeableConcept Thông tin an toàn của thiết bị cấy ghép #xD; <img src="[binary]" alt="doco" style="background-color: inherit"/> Documentation for this format
extension:
  url:
    v: http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-legal-basis
    l: vn-ext-legal-basis
  value: Coding
    system:
      v: http://fhir.hl7.org.vn/core/CodeSystem/vn-legal-document-ref-cs
      l: vn-legal-document-ref-cs
    code:
      v: ND-98-2021
extension:
  url:
    v: http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-legal-basis
    l: vn-ext-legal-basis
  value: Coding
    system:
      v: http://fhir.hl7.org.vn/core/CodeSystem/vn-legal-document-ref-cs
      l: vn-legal-document-ref-cs
    code:
      v: ND-07-2023
extension:
  url:
    v: http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-legal-basis
    l: vn-ext-legal-basis
  value: Coding
    system:
      v: http://fhir.hl7.org.vn/core/CodeSystem/vn-legal-document-ref-cs
      l: vn-legal-document-ref-cs
    code:
      v: ND-04-2025
extension:
  url:
    v: http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-legal-basis
    l: vn-ext-legal-basis
  value: Coding
    system:
      v: http://fhir.hl7.org.vn/core/CodeSystem/vn-legal-document-ref-cs
      l: vn-legal-document-ref-cs
    code:
      v: TT-05-2022
extension:
  url:
    v: http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-legal-basis
    l: vn-ext-legal-basis
  value: Coding
    system:
      v: http://fhir.hl7.org.vn/core/CodeSystem/vn-legal-document-ref-cs
      l: vn-legal-document-ref-cs
    code:
      v: TT-59-2025
extension:
  url:
    v: http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-legal-basis
    l: vn-ext-legal-basis
  value: Coding
    system:
      v: http://fhir.hl7.org.vn/core/CodeSystem/vn-legal-document-ref-cs
      l: vn-legal-document-ref-cs
    code:
      v: TT-04-2017
extension:
  url:
    v: http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-legal-basis
    l: vn-ext-legal-basis
  value: Coding
    system:
      v: http://fhir.hl7.org.vn/core/CodeSystem/vn-legal-document-ref-cs
      l: vn-legal-document-ref-cs
    code:
      v: TT-24-2025
extension:
  url:
    v: http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-legal-basis
    l: vn-ext-legal-basis
  value: Coding
    system:
      v: http://fhir.hl7.org.vn/core/CodeSystem/vn-legal-document-ref-cs
      l: vn-legal-document-ref-cs
    code:
      v: QD-3176-2024
extension:
  url:
    v: http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-legal-basis
    l: vn-ext-legal-basis
  value: Coding
    system:
      v: http://fhir.hl7.org.vn/core/CodeSystem/vn-legal-document-ref-cs
      l: vn-legal-document-ref-cs
    code:
      v: TT-57-2025
extension:
  url:
    v: http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-legal-basis
    l: vn-ext-legal-basis
  value: Coding
    system:
      v: http://fhir.hl7.org.vn/core/CodeSystem/vn-legal-document-ref-cs
      l: vn-legal-document-ref-cs
    code:
      v: ND-214-2025
extension:
  url:
    v: http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-legal-basis
    l: vn-ext-legal-basis
  value: Coding
    system:
      v: http://fhir.hl7.org.vn/core/CodeSystem/vn-legal-document-ref-cs
      l: vn-legal-document-ref-cs
    code:
      v: QD-3107-2024
extension:
  url:
    v: http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-legal-basis
    l: vn-ext-legal-basis
  value: Coding
    system:
      v: http://fhir.hl7.org.vn/core/CodeSystem/vn-legal-document-ref-cs
      l: vn-legal-document-ref-cs
    code:
      v: QD-847-2025
extension:
  url:
    v: http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-legal-basis
    l: vn-ext-legal-basis
  value: Coding
    system:
      v: http://fhir.hl7.org.vn/core/CodeSystem/vn-legal-document-ref-cs
      l: vn-legal-document-ref-cs
    code:
      v: QD-3176-2024
url:
  v: http://fhir.hl7.org.vn/core/StructureDefinition/vn-core-implantable-device
  l: vn-core-implantable-device
version:
  v: 0.5.1
name:
  v: VNCoreImplantableDevice
title:
  v: Thiết bị cấy ghép VN Core — VN Core Implantable Device Profile
status:
  v: draft
date:
  v: 2026-04-19
publisher:
  v: Omi HealthTech / VN Core FHIR Community Initiative
contact:
  name:
    v: Omi HealthTech / VN Core FHIR Community Initiative
  telecom:
    system:
      v: url
    value:
      v: https://hl7.org.vn
  telecom:
    system:
      v: email
contact:
  name:
    v: Omi HealthTech (OmiGroup)
  telecom:
    system:
      v: url
    value:
      v: https://omihealthtech.vn
  telecom:
    system:
      v: url
    value:
      v: https://omigroup.vn
  telecom:
    system:
      v: email
description:
  v: Profile Device chuyên cho thiết bị cấy ghép gắn với người bệnh tại Việt Nam. Kế thừa VNCoreDevice nhưng siết các điểm tối thiểu theo thông lệ US Core Implantable Device: patient-bound, type bắt buộc, status bắt buộc, UDI/lifecycle/safety là Must Support. UDI carrier là best practice quốc tế của HL7/FHIR và TCVN về UDI; pháp luật Việt Nam hiện chưa được model như yêu cầu UDI bắt buộc cho mọi thiết bị, nên profile chỉ cảnh báo khi UDI carrier thiếu nội dung HRF/AIDC. QĐ 847/QĐ-BYT (2025) và QĐ 3107/QĐ-BYT (2024) là nguồn terminology/provenance ứng viên cho danh pháp thiết bị (package hl7.fhir.vn.device), không phải required binding trong profile này. Căn cứ pháp lý cập nhật: NĐ 98/2021/NĐ-CP đã được sửa đổi, bổ sung bởi NĐ 07/2023/NĐ-CP và NĐ 04/2025/NĐ-CP; TT 05/2022/TT-BYT đã được sửa đổi, bổ sung bởi TT 59/2025/TT-BYT.
jurisdiction:
  coding:
    system:
      v: urn:iso:std:iso:3166
      l: 3166
    code:
      v: VN
    display:
      v: Viet Nam
copyright:
  v: Căn cứ thiết kế: FHIR R4 Device, US Core Implantable Device pattern, TT 04/2017/TT-BYT, TT 24/2025/TT-BYT, VBHN 14/VBHN-BYT, QĐ 3176/QĐ-BYT, NĐ 98/2021/NĐ-CP đã được sửa đổi, bổ sung bởi NĐ 07/2023/NĐ-CP (03/03/2023) và NĐ 04/2025/NĐ-CP (hiệu lực 01/01/2025), TT 05/2022/TT-BYT đã được sửa đổi, bổ sung bởi TT 59/2025/TT-BYT, TCVN 13995:2024 và TCVN 13996:2024. QĐ 3107/QĐ-BYT (2024) và QĐ 847/QĐ-BYT (2025) là nguồn terminology/provenance ứng viên, chưa là required binding.
fhir version:
  v: 4.0.1
mapping:
  identity:
    v: rim

v: RIM Mapping

identity:
  v: w5
uri:
  v: http://hl7.org/fhir/fivews
  l: fivews
name:
  v: FiveWs Pattern Mapping

identity:
  v: udi
uri:
  v: http://fda.gov/UDI
  l: UDI
name:
  v: UDI Mapping

v: resource

v: false

v: Device
l: Device

v: constraint

extension:
  url:
    v: http://hl7.org/fhir/tools/StructureDefinition/snapshot-base-version
    l: snapshot-base-version
  value: String
    v: 0.5.1
element:
  id:
    v: Device
  path:
    v: Device
  short:
    v: Item used in healthcare
  definition:
    v: A type of a manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device.
  min:
    v: 0
  max:
    v: *
  base:
    path:
      v: Device
    min:
      v: 0
    max:
      v: *
  constraint:
    key:
      v: dom-2
    severity:
      v: error
    human:
      v: If the resource is contained in another resource, it SHALL NOT contain nested Resources
    expression:
      v: contained.contained.empty()
    xpath:
      v: not(parent::f:contained and f:contained)
    source:
      v: http://hl7.org/fhir/StructureDefinition/DomainResource
      l: DomainResource
  constraint:
    key:
      v: dom-3
    severity:
      v: error
    human:
      v: If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource
    expression:
      v: contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()
    xpath:
      v: not(exists(for $id in f:contained/*/f:id/@value return $contained[not(parent::*/descendant::f:reference/@value=concat('#', $contained/*/id/@value) or descendant::f:reference[@value='#'])]))
    source:
      v: http://hl7.org/fhir/StructureDefinition/DomainResource
      l: DomainResource
  constraint:
    key:
      v: dom-4
    severity:
      v: error
    human:
      v: If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated
    expression:
      v: contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()
    xpath:
      v: not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))
    source:
      v: http://hl7.org/fhir/StructureDefinition/DomainResource
      l: DomainResource
  constraint:
    key:
      v: dom-5
    severity:
      v: error
    human:
      v: If a resource is contained in another resource, it SHALL NOT have a security label
    expression:
      v: contained.meta.security.empty()
    xpath:
      v: not(exists(f:contained/*/f:meta/f:security))
    source:
      v: http://hl7.org/fhir/StructureDefinition/DomainResource
      l: DomainResource
  constraint:
    extension:
      url:
        v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice
        l: elementdefinition-bestpractice
      value: Boolean
        v: true
    extension:
      url:
        v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation
        l: elementdefinition-bestpractice-explanation
      value: Markdown
        v: When a resource has no narrative, only systems that fully understand the data can display the resource to a human safely. Including a human readable representation in the resource makes for a much more robust eco-system and cheaper handling of resources by intermediary systems. Some ecosystems restrict distribution of resources to only those systems that do fully understand the resources, and as a consequence implementers may believe that the narrative is superfluous. However experience shows that such eco-systems often open up to new participants over time.
    key:
      v: dom-6
    severity:
      v: warning
    human:
      v: A resource should have narrative for robust management
    expression:
      v: text.`div`.exists()
    xpath:
      v: exists(f:text/h:div)
    source:
      v: http://hl7.org/fhir/StructureDefinition/DomainResource
      l: DomainResource
  constraint:
    key:
      v: vn-implant-udi-carrier-content
    severity:
      v: warning
    human:
      v: Nếu ghi nhận UDI carrier cho thiết bị cấy ghép, nên có ít nhất HRF hoặc AIDC để hỗ trợ truy xuất và quét mã.
    expression:
      v: udiCarrier.empty() or udiCarrier.all(carrierHRF.exists() or carrierAIDC.exists())
    source:
      v: http://fhir.hl7.org.vn/core/StructureDefinition/vn-core-implantable-device
      l: vn-core-implantable-device
  constraint:
    key:
      v: vn-implant-regnum-class-cd
    severity:
      v: warning
    human:
      v: Thiết bị cấy ghép loại C hoặc D theo NĐ 98/2021/NĐ-CP Điều 4 (đã được sửa đổi, bổ sung bởi NĐ 07/2023/NĐ-CP và NĐ 04/2025/NĐ-CP) phải có số lưu hành TBYT do Bộ Y tế cấp. Cảnh báo nếu thiếu.
    expression:
      v: extension('http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-device-risk-class').value.coding.where(code = 'C' or code = 'D').empty() or extension('http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-device-registration-number').exists()
    source:
      v: http://fhir.hl7.org.vn/core/StructureDefinition/vn-core-implantable-device
      l: vn-core-implantable-device
  is modifier:
    v: false
  is summary:
    v: false
  mapping:
    identity:
      v: rim
    map:
      v: Entity. Role, or Act
  mapping:
    identity:
      v: rim
    map:
      v: Device
element:
  id:
    v: Device.id
  path:
    v: Device.id
  short:
    v: Logical id of this artifact
  definition:
    v: The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.
  comment:
    v: The only time that a resource does not have an id is when it is being submitted to the server using a create operation.
  min:
    v: 0
  max:
    v: 1
  base:
    path:
      v: Resource.id
    min:
      v: 0
    max:
      v: 1
  type:
    extension:
      url:
        v: http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type
        l: structuredefinition-fhir-type
      value: Url
        v: id
        l: id
    code:
      v: http://hl7.org/fhirpath/System.String
      l: System.String
  is modifier:
    v: false
  is summary:
    v: true
element:
  id:
    v: Device.meta
  path:
    v: Device.meta
  short:
    v: Metadata about the resource
  definition:
    v: The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.
  min:
    v: 0
  max:
    v: 1
  base:
    path:
      v: Resource.meta
    min:
      v: 0
    max:
      v: 1

code:
  v: Meta
  l: Meta

key:
  v: ele-1
severity:
  v: error
human:
  v: All FHIR elements must have a @value or children
expression:
  v: hasValue() or (children().count() > id.count())
xpath:
  v: @value|f:*|h:div
source:
  v: http://hl7.org/fhir/StructureDefinition/Element
  l: Element

v: false

v: true

id:
  v: Device.implicitRules
path:
  v: Device.implicitRules
short:
  v: A set of rules under which this content was created
definition:
  v: A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.
comment:
  v: Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. Often, when used, the URL is a reference to an implementation guide that defines these special rules as part of it's narrative along with other profiles, value sets, etc.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Resource.implicitRules
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: uri
    l: uri
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: true
is modifier reason:
  v: This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation
is summary:
  v: true

id:
  v: Device.language
path:
  v: Device.language
short:
  v: Language of the resource content
definition:
  v: The base language in which the resource is written.
comment:
  v: Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource. Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Resource.language
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
    l: code
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet
      l: elementdefinition-maxValueSet
    value: Canonical
      v: http://hl7.org/fhir/ValueSet/all-languages
      l: all-languages
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: Language
  strength:
    v: preferred
  description:
    v: A human language.
  value set:
    v: http://hl7.org/fhir/ValueSet/languages|4.0.1
    l: http://hl7.org/fhir/ValueSet/languages

id:
  v: Device.text
path:
  v: Device.text
short:
  v: Text summary of the resource, for human interpretation
definition:
  v: A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.
comment:
  v: Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied). This may be necessary for data from legacy systems where information is captured as a "text blob" or where text is additionally entered raw or narrated and encoded information is added later.
alias:
  v: narrative
alias:
  v: html
alias:
  v: xhtml
alias:
  v: display
min:
  v: 0
max:
  v: 1
base:
  path:
    v: DomainResource.text
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Narrative
    l: Narrative
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: Act.text?

id:
  v: Device.contained
path:
  v: Device.contained
short:
  v: Contained, inline Resources
definition:
  v: These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope.
comment:
  v: This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again. Contained resources may have profiles and tags In their meta elements, but SHALL NOT have security labels.
alias:
  v: inline resources
alias:
  v: anonymous resources
alias:
  v: contained resources
min:
  v: 0
max:
  v: *
base:
  path:
    v: DomainResource.contained
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Resource
    l: Resource
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Device.extension
path:
  v: Device.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  ordered:
    v: false
  rules:
    v: open
short:
  v: Extension
definition:
  v: An Extension
min:
  v: 0
max:
  v: *
base:
  path:
    v: DomainResource.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: false
is summary:
  v: false

id:
  v: Device.extension:deviceGroup
path:
  v: Device.extension
slice name:
  v: deviceGroup
short:
  v: Nhóm TBYT BHYT N01-N09
definition:
  v: Nhóm thiết bị y tế theo TT 04/2017/TT-BYT Phụ lục 01, sửa đổi bởi TT 24/2025/TT-BYT và văn bản hợp nhất hiện hành. Đây là phân loại phục vụ thanh toán/đối soát BHYT; khi đang biểu diễn một dòng chi phí, ưu tiên đặt tại Claim.item.extension[deviceGroup] thay vì coi là thuộc tính nội tại bắt buộc của Device.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: DomainResource.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-device-group
    l: vn-ext-device-group
condition:
  v: ele-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: false
is summary:
  v: false

id:
  v: Device.extension:riskClass
path:
  v: Device.extension
slice name:
  v: riskClass
short:
  v: Phân loại rủi ro A/B/C/D — Must Support cho thiết bị cấy ghép
definition:
  v: Phân loại rủi ro thiết bị y tế A/B/C/D theo NĐ 98/2021/NĐ-CP Điều 4 (đã được sửa đổi, bổ sung bởi NĐ 07/2023/NĐ-CP và NĐ 04/2025/NĐ-CP) và TT 05/2022/TT-BYT (đã được sửa đổi, bổ sung bởi TT 59/2025/TT-BYT). Extension này là tùy chọn trên Device vì risk class là thuộc tính pháp lý ở mức sản phẩm/model/regulatory context; không bắt buộc cho mọi Device instance trong trao đổi lâm sàng hoặc BHYT. Phân biệt rõ với các dimension độc lập KHÔNG dùng extension này: - Nhóm TBYT BHYT N01-N09 (TT 04/2017/TT-BYT Phụ lục 01) → dùng VNCoreExtDeviceGroup; - Danh pháp thiết bị y tế (QĐ 3107/2024, QĐ 847/2025) → dùng Device.type với hệ danh pháp; - 6 nhóm phân loại tiêu chuẩn kỹ thuật/chất lượng phục vụ đấu thầu theo TT 57/2025/TT-BYT (31/12/2025, hiệu lực 15/02/2026, triển khai 01/01/2027, căn cứ NĐ 214/2025/NĐ-CP về Luật Đấu thầu) → nếu cần biểu diễn, dùng extension riêng trong package procurement, KHÔNG dùng extension này.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: DomainResource.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-device-risk-class
    l: vn-ext-device-risk-class
condition:
  v: ele-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
must support:
  v: true
is modifier:
  v: false
is summary:
  v: false

id:
  v: Device.extension:registrationNumber
path:
  v: Device.extension
slice name:
  v: registrationNumber
short:
  v: Số lưu hành TBYT — Must Support cho thiết bị cấy ghép C/D
definition:
  v: Số lưu hành (registration number) của thiết bị y tế tại Việt Nam. **Căn cứ pháp lý**: NĐ 98/2021/NĐ-CP Điều 21 (Phân nhóm số lưu hành), Chương III (Điều 17-33) về đăng ký lưu hành TBYT, đã được sửa đổi, bổ sung bởi NĐ 07/2023/NĐ-CP (03/03/2023) và NĐ 04/2025/NĐ-CP (hiệu lực 01/01/2025). **Phân nhóm theo NĐ 98/2021 Điều 21**: 1. **Loại A & B — Số công bố tiêu chuẩn áp dụng** (Sở Y tế tỉnh/TP tiếp nhận): - Format: `[STT tiếp nhận]/[Năm tiếp nhận 2 số]/[Mã ký hiệu Sở Y tế]-PCBA` (loại A) - Format: `[STT tiếp nhận]/[Năm tiếp nhận 2 số]/[Mã ký hiệu Sở Y tế]-PCBB` (loại B) - PCBA/PCBB = Phiếu công bố loại A / loại B - Ví dụ: `2300001/23/HN-PCBA` (Hồ sơ số 1 năm 2023, Sở Y tế Hà Nội tiếp nhận) 2. **Loại C & D — Số Giấy chứng nhận đăng ký lưu hành** (Bộ Y tế cấp): - Format chuẩn: `[STT cấp]/[Năm cấp 2 số]/BYT-ĐKLH` - Format rút gọn: `[STT cấp]/BYT-ĐKLH` - ĐKLH = Đăng ký lưu hành - Ví dụ: `2300055/BYT-ĐKLH` hoặc `2300055/23/BYT-ĐKLH` **Phạm vi**: - Bắt buộc cho loại B/C/D trước khi đưa ra thị trường - Loại A chỉ công bố tiêu chuẩn áp dụng (vẫn dùng PCBA format) - Đây là định danh ở mức sản phẩm/model/regulatory context, KHÔNG phải định danh per-instance **Lưu ý phân biệt**: Extension này độc lập với: - UDI (định danh per-instance theo HL7 best practice) - MA_VAT_TU (mã nghiệp vụ BHYT theo QĐ 3176) - Serial number (per-instance physical) - Mã tài sản BV (internal facility code)
min:
  v: 0
max:
  v: 1
base:
  path:
    v: DomainResource.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-device-registration-number
    l: vn-ext-device-registration-number
condition:
  v: ele-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
must support:
  v: true
is modifier:
  v: false
is summary:
  v: false

id:
  v: Device.extension:isIVD
path:
  v: Device.extension
slice name:
  v: isIVD
short:
  v: Cờ IVD (chẩn đoán in vitro)
definition:
  v: Cờ boolean phân biệt TBYT IVD (chẩn đoán in vitro: sinh phẩm, thuốc thử, máy xét nghiệm) với TBYT thông thường theo VBHN 08/2026/VBHN-BYT. Tùy chọn — chỉ đặt khi cần phân biệt rõ trong ngữ cảnh đăng ký lưu hành/đấu thầu/BHYT.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: DomainResource.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-device-ivd
    l: vn-ext-device-ivd
condition:
  v: ele-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: false
is summary:
  v: false

id:
  v: Device.modifierExtension
path:
  v: Device.modifierExtension
short:
  v: Extensions that cannot be ignored
definition:
  v: May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it 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 is allowed to 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).
comment:
  v: 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.
requirements:
  v: 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](http://hl7.org/fhir/R4/extensibility.html#modifierExtension).
alias:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: DomainResource.modifierExtension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: true
is modifier reason:
  v: Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Device.identifier
path:
  v: Device.identifier
slicing:
  discriminator:
    type:
      v: value
    path:
      v: system
  description:
    v: Phân loại identifier theo system
  rules:
    v: open
short:
  v: Định danh TBYT (mã vật tư/thiết bị, serial number)
definition:
  v: Unique instance identifiers assigned to a device by manufacturers other organizations or owners.
comment:
  v: The barcode string from a barcode present on a device label or package may identify the instance, include names given to the device in local usage, or may identify the type of device. If the identifier identifies the type of device, Device.type element should be used.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Device.identifier
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Identifier
    l: Identifier
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.identifier
mapping:
  identity:
    v: rim
  map:
    v: .id
mapping:
  identity:
    v: udi
  map:
    v: The serial number which is a component of the production identifier (PI), a conditional, variable portion of a UDI. The identifier.type code should be set to “SNO”(Serial Number) and the system left empty.

id:
  v: Device.identifier:medicalDeviceItemCode
path:
  v: Device.identifier
slice name:
  v: medicalDeviceItemCode
short:
  v: Mã vật tư/thiết bị y tế (MA_VAT_TU)
definition:
  v: Mã vật tư/thiết bị y tế dùng trong XML dữ liệu đầu ra KCB và thanh toán BHYT. Mapping QĐ 3176/QĐ-BYT: MA_VAT_TU. Đây là mã nghiệp vụ/legacy; không phải UDI, serial number, số lưu hành hoặc mã tài sản. Khi mã này được dùng như product/service code của dòng chi phí, ưu tiên biểu diễn ở Claim.item.productOrService.
comment:
  v: The barcode string from a barcode present on a device label or package may identify the instance, include names given to the device in local usage, or may identify the type of device. If the identifier identifies the type of device, Device.type element should be used.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Device.identifier
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Identifier
    l: Identifier
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.identifier
mapping:
  identity:
    v: rim
  map:
    v: .id
mapping:
  identity:
    v: udi
  map:
    v: The serial number which is a component of the production identifier (PI), a conditional, variable portion of a UDI. The identifier.type code should be set to “SNO”(Serial Number) and the system left empty.

id:
  v: Device.identifier:medicalDeviceItemCode.id
path:
  v: Device.identifier.id
representation:
  v: xmlAttr
short:
  v: Unique id for inter-element referencing
definition:
  v: Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.id
  min:
    v: 0
  max:
    v: 1
type:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type
      l: structuredefinition-fhir-type
    value: Url
      v: string
      l: string
  code:
    v: http://hl7.org/fhirpath/System.String
    l: System.String
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Device.identifier:medicalDeviceItemCode.extension
path:
  v: Device.identifier.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  description:
    v: Extensions are always sliced by (at least) url
  rules:
    v: open
short:
  v: Additional content defined by implementations
definition:
  v: 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.
comment:
  v: 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.
alias:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Device.identifier:medicalDeviceItemCode.use
path:
  v: Device.identifier.use
short:
  v: usual | official | temp | secondary | old (If known)
definition:
  v: The purpose of this identifier.
comment:
  v: Applications can assume that an identifier is permanent unless it explicitly says that it is temporary.
requirements:
  v: Allows the appropriate identifier for a particular context of use to be selected from among a set of identifiers.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Identifier.use
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
    l: code
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: true
is modifier reason:
  v: This is labeled as "Is Modifier" because applications should not mistake a temporary id for a permanent one.
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: IdentifierUse
  strength:
    v: required
  description:
    v: Identifies the purpose for this identifier, if known .
  value set:
    v: http://hl7.org/fhir/ValueSet/identifier-use|4.0.1
    l: http://hl7.org/fhir/ValueSet/identifier-use
mapping:
  identity:
    v: v2
  map:
    v: N/A
mapping:
  identity:
    v: rim
  map:
    v: Role.code or implied by context

id:
  v: Device.identifier:medicalDeviceItemCode.type
path:
  v: Device.identifier.type
short:
  v: Description of identifier
definition:
  v: A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.
comment:
  v: This element deals only with general categories of identifiers. It SHOULD not be used for codes that correspond 1..1 with the Identifier.system. Some identifiers may fall into multiple categories due to common usage. Where the system is known, a type is unnecessary because the type is always part of the system definition. However systems often need to handle identifiers where the system is not known. There is not a 1:1 relationship between type and system, since many different systems have the same type.
requirements:
  v: Allows users to make use of identifiers when the identifier system is not known.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Identifier.type
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: IdentifierType
  strength:
    v: extensible
  description:
    v: A coded type for an identifier that can be used to determine which identifier to use for a specific purpose.
  value set:
    v: http://hl7.org/fhir/ValueSet/identifier-type|4.0.1
    l: http://hl7.org/fhir/ValueSet/identifier-type
mapping:
  identity:
    v: v2
  map:
    v: CX.5
mapping:
  identity:
    v: rim
  map:
    v: Role.code or implied by context

id:
  v: Device.identifier:medicalDeviceItemCode.type.id
path:
  v: Device.identifier.type.id
representation:
  v: xmlAttr
short:
  v: Unique id for inter-element referencing
definition:
  v: Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.id
  min:
    v: 0
  max:
    v: 1
type:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type
      l: structuredefinition-fhir-type
    value: Url
      v: string
      l: string
  code:
    v: http://hl7.org/fhirpath/System.String
    l: System.String
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Device.identifier:medicalDeviceItemCode.type.extension
path:
  v: Device.identifier.type.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  description:
    v: Extensions are always sliced by (at least) url
  rules:
    v: open
short:
  v: Additional content defined by implementations
definition:
  v: 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.
comment:
  v: 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.
alias:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Device.identifier:medicalDeviceItemCode.type.coding
path:
  v: Device.identifier.type.coding
short:
  v: Code defined by a terminology system
definition:
  v: A reference to a code defined by a terminology system.
comment:
  v: Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information. Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.
requirements:
  v: Allows for alternative encodings within a code system, and translations to other code systems.
min:
  v: 0
max:
  v: *
base:
  path:
    v: CodeableConcept.coding
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Coding
    l: Coding
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: C*E.1-8, C*E.10-22
mapping:
  identity:
    v: rim
  map:
    v: union(., ./translation)
mapping:
  identity:
    v: orim
  map:
    v: fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding

id:
  v: Device.identifier:medicalDeviceItemCode.type.text
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable
    l: elementdefinition-translatable
  value: Boolean
    v: true
path:
  v: Device.identifier.type.text
short:
  v: Plain text representation of the concept
definition:
  v: A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.
comment:
  v: Very often the text is the same as a displayName of one of the codings.
requirements:
  v: The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CodeableConcept.text
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
pattern: String
  v: Mã vật tư/thiết bị y tế
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: C*E.9. But note many systems use C*E.2 for this
mapping:
  identity:
    v: rim
  map:
    v: ./originalText[mediaType/code="text/plain"]/data
mapping:
  identity:
    v: orim
  map:
    v: fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText

id:
  v: Device.identifier:medicalDeviceItemCode.system
path:
  v: Device.identifier.system
short:
  v: The namespace for the identifier value
definition:
  v: Establishes the namespace for the value - that is, a URL that describes a set values that are unique.
comment:
  v: Identifier.system is always case sensitive.
requirements:
  v: There are many sets of identifiers. To perform matching of two identifiers, we need to know what set we're dealing with. The system identifies a particular set of unique identifiers.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Identifier.system
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: uri
    l: uri
fixed: Uri
  v: http://fhir.hl7.org.vn/core/sid/medical-device-item-code
  l: medical-device-item-code
example:
  label:
    v: General
  value: Uri
    v: http://www.acme.com/identifiers/patient
    l: patient
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: CX.4 / EI-2-4
mapping:
  identity:
    v: rim
  map:
    v: II.root or Role.id.root
mapping:
  identity:
    v: servd
  map:
    v: ./IdentifierType

id:
  v: Device.identifier:medicalDeviceItemCode.value
path:
  v: Device.identifier.value
short:
  v: Giá trị MA_VAT_TU
definition:
  v: The portion of the identifier typically relevant to the user and which is unique within the context of the system.
comment:
  v: If the value is a full URI, then the system SHALL be urn:ietf:rfc:3986. The value's primary purpose is computational mapping. As a result, it may be normalized for comparison purposes (e.g. removing non-significant whitespace, dashes, etc.) A value formatted for human display can be conveyed using the [Rendered Value extension](http://hl7.org/fhir/R4/extension-rendered-value.html). Identifier.value is to be treated as case sensitive unless knowledge of the Identifier.system allows the processer to be confident that non-case-sensitive processing is safe.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Identifier.value
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
example:
  label:
    v: General
  value: String
    v: 123456
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: CX.1 / EI.1
mapping:
  identity:
    v: rim
  map:
    v: II.extension or II.root if system indicates OID or GUID (Or Role.id.extension or root)
mapping:
  identity:
    v: servd
  map:
    v: ./Value

id:
  v: Device.identifier:medicalDeviceItemCode.period
path:
  v: Device.identifier.period
short:
  v: Time period when id is/was valid for use
definition:
  v: Time period during which identifier is/was valid for use.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Identifier.period
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Period
    l: Period
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: CX.7 + CX.8
mapping:
  identity:
    v: rim
  map:
    v: Role.effectiveTime or implied by context
mapping:
  identity:
    v: servd
  map:
    v: ./StartDate and ./EndDate

id:
  v: Device.identifier:medicalDeviceItemCode.assigner
path:
  v: Device.identifier.assigner
short:
  v: Organization that issued id (may be just text)
definition:
  v: Organization that issued/manages the identifier.
comment:
  v: The Identifier.assigner may omit the .reference element and only contain a .display element reflecting the name or other textual information about the assigning organization.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Identifier.assigner
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Organization|4.0.1
    l: http://hl7.org/fhir/StructureDefinition/Organization
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: CX.4 / (CX.4,CX.9,CX.10)
mapping:
  identity:
    v: rim
  map:
    v: II.assigningAuthorityName but note that this is an improper use by the definition of the field. Also Role.scoper
mapping:
  identity:
    v: servd
  map:
    v: ./IdentifierIssuingAuthority

id:
  v: Device.identifier:serialNumber
path:
  v: Device.identifier
slice name:
  v: serialNumber
short:
  v: Số serial dạng Identifier
definition:
  v: Số serial khi hệ thống trao đổi dưới dạng Identifier. Device.serialNumber vẫn là vị trí FHIR chính để ghi serial number.
comment:
  v: The barcode string from a barcode present on a device label or package may identify the instance, include names given to the device in local usage, or may identify the type of device. If the identifier identifies the type of device, Device.type element should be used.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Device.identifier
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Identifier
    l: Identifier
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.identifier
mapping:
  identity:
    v: rim
  map:
    v: .id
mapping:
  identity:
    v: udi
  map:
    v: The serial number which is a component of the production identifier (PI), a conditional, variable portion of a UDI. The identifier.type code should be set to “SNO”(Serial Number) and the system left empty.

id:
  v: Device.identifier:serialNumber.id
path:
  v: Device.identifier.id
representation:
  v: xmlAttr
short:
  v: Unique id for inter-element referencing
definition:
  v: Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.id
  min:
    v: 0
  max:
    v: 1
type:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type
      l: structuredefinition-fhir-type
    value: Url
      v: string
      l: string
  code:
    v: http://hl7.org/fhirpath/System.String
    l: System.String
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Device.identifier:serialNumber.extension
path:
  v: Device.identifier.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  description:
    v: Extensions are always sliced by (at least) url
  rules:
    v: open
short:
  v: Additional content defined by implementations
definition:
  v: 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.
comment:
  v: 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.
alias:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Device.identifier:serialNumber.use
path:
  v: Device.identifier.use
short:
  v: usual | official | temp | secondary | old (If known)
definition:
  v: The purpose of this identifier.
comment:
  v: Applications can assume that an identifier is permanent unless it explicitly says that it is temporary.
requirements:
  v: Allows the appropriate identifier for a particular context of use to be selected from among a set of identifiers.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Identifier.use
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
    l: code
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: true
is modifier reason:
  v: This is labeled as "Is Modifier" because applications should not mistake a temporary id for a permanent one.
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: IdentifierUse
  strength:
    v: required
  description:
    v: Identifies the purpose for this identifier, if known .
  value set:
    v: http://hl7.org/fhir/ValueSet/identifier-use|4.0.1
    l: http://hl7.org/fhir/ValueSet/identifier-use
mapping:
  identity:
    v: v2
  map:
    v: N/A
mapping:
  identity:
    v: rim
  map:
    v: Role.code or implied by context

id:
  v: Device.identifier:serialNumber.type
path:
  v: Device.identifier.type
short:
  v: Description of identifier
definition:
  v: A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.
comment:
  v: This element deals only with general categories of identifiers. It SHOULD not be used for codes that correspond 1..1 with the Identifier.system. Some identifiers may fall into multiple categories due to common usage. Where the system is known, a type is unnecessary because the type is always part of the system definition. However systems often need to handle identifiers where the system is not known. There is not a 1:1 relationship between type and system, since many different systems have the same type.
requirements:
  v: Allows users to make use of identifiers when the identifier system is not known.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Identifier.type
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
pattern: CodeableConcept
  coding:
    system:
      v: http://terminology.hl7.org/CodeSystem/v2-0203
      l: v2-0203
    code:
      v: SNO
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: IdentifierType
  strength:
    v: extensible
  description:
    v: A coded type for an identifier that can be used to determine which identifier to use for a specific purpose.
  value set:
    v: http://hl7.org/fhir/ValueSet/identifier-type|4.0.1
    l: http://hl7.org/fhir/ValueSet/identifier-type
mapping:
  identity:
    v: v2
  map:
    v: CX.5
mapping:
  identity:
    v: rim
  map:
    v: Role.code or implied by context

id:
  v: Device.identifier:serialNumber.system
path:
  v: Device.identifier.system
short:
  v: The namespace for the identifier value
definition:
  v: Establishes the namespace for the value - that is, a URL that describes a set values that are unique.
comment:
  v: Identifier.system is always case sensitive.
requirements:
  v: There are many sets of identifiers. To perform matching of two identifiers, we need to know what set we're dealing with. The system identifies a particular set of unique identifiers.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Identifier.system
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: uri
    l: uri
fixed: Uri
  v: http://fhir.hl7.org.vn/core/sid/device-serial-number
  l: device-serial-number
example:
  label:
    v: General
  value: Uri
    v: http://www.acme.com/identifiers/patient
    l: patient
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: CX.4 / EI-2-4
mapping:
  identity:
    v: rim
  map:
    v: II.root or Role.id.root
mapping:
  identity:
    v: servd
  map:
    v: ./IdentifierType

id:
  v: Device.identifier:serialNumber.value
path:
  v: Device.identifier.value
short:
  v: Số serial
definition:
  v: The portion of the identifier typically relevant to the user and which is unique within the context of the system.
comment:
  v: If the value is a full URI, then the system SHALL be urn:ietf:rfc:3986. The value's primary purpose is computational mapping. As a result, it may be normalized for comparison purposes (e.g. removing non-significant whitespace, dashes, etc.) A value formatted for human display can be conveyed using the [Rendered Value extension](http://hl7.org/fhir/R4/extension-rendered-value.html). Identifier.value is to be treated as case sensitive unless knowledge of the Identifier.system allows the processer to be confident that non-case-sensitive processing is safe.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Identifier.value
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
example:
  label:
    v: General
  value: String
    v: 123456
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: CX.1 / EI.1
mapping:
  identity:
    v: rim
  map:
    v: II.extension or II.root if system indicates OID or GUID (Or Role.id.extension or root)
mapping:
  identity:
    v: servd
  map:
    v: ./Value

id:
  v: Device.identifier:serialNumber.period
path:
  v: Device.identifier.period
short:
  v: Time period when id is/was valid for use
definition:
  v: Time period during which identifier is/was valid for use.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Identifier.period
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Period
    l: Period
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: CX.7 + CX.8
mapping:
  identity:
    v: rim
  map:
    v: Role.effectiveTime or implied by context
mapping:
  identity:
    v: servd
  map:
    v: ./StartDate and ./EndDate

id:
  v: Device.identifier:serialNumber.assigner
path:
  v: Device.identifier.assigner
short:
  v: Organization that issued id (may be just text)
definition:
  v: Organization that issued/manages the identifier.
comment:
  v: The Identifier.assigner may omit the .reference element and only contain a .display element reflecting the name or other textual information about the assigning organization.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Identifier.assigner
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Organization|4.0.1
    l: http://hl7.org/fhir/StructureDefinition/Organization
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: CX.4 / (CX.4,CX.9,CX.10)
mapping:
  identity:
    v: rim
  map:
    v: II.assigningAuthorityName but note that this is an improper use by the definition of the field. Also Role.scoper
mapping:
  identity:
    v: servd
  map:
    v: ./IdentifierIssuingAuthority

id:
  v: Device.definition
path:
  v: Device.definition
short:
  v: The reference to the definition for the device
definition:
  v: The reference to the definition for the device.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Device.definition
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/DeviceDefinition|4.0.1
    l: http://hl7.org/fhir/StructureDefinition/DeviceDefinition
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false

id:
  v: Device.udiCarrier
path:
  v: Device.udiCarrier
short:
  v: UDI carrier của thiết bị cấy ghép khi có
definition:
  v: Unique device identifier (UDI) assigned to device label or package. Note that the Device may include multiple udiCarriers as it either may include just the udiCarrier for the jurisdiction it is sold, or for multiple jurisdictions it could have been sold.
comment:
  v: UDI may identify an unique instance of a device, or it may only identify the type of the device. See [UDI mappings](http://hl7.org/fhir/R4/device-mappings.html#udi) for a complete mapping of UDI parts to Device.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Device.udiCarrier
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: BackboneElement
    l: BackboneElement
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.identifier
mapping:
  identity:
    v: rim
  map:
    v: .id and .code

id:
  v: Device.udiCarrier.id
path:
  v: Device.udiCarrier.id
representation:
  v: xmlAttr
short:
  v: Unique id for inter-element referencing
definition:
  v: Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.id
  min:
    v: 0
  max:
    v: 1
type:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type
      l: structuredefinition-fhir-type
    value: Url
      v: string
      l: string
  code:
    v: http://hl7.org/fhirpath/System.String
    l: System.String
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Device.udiCarrier.extension
path:
  v: Device.udiCarrier.extension
short:
  v: Additional content defined by implementations
definition:
  v: 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.
comment:
  v: 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.
alias:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Device.udiCarrier.modifierExtension
path:
  v: Device.udiCarrier.modifierExtension
short:
  v: Extensions that cannot be ignored even if unrecognized
definition:
  v: 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).
comment:
  v: 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.
requirements:
  v: 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](http://hl7.org/fhir/R4/extensibility.html#modifierExtension).
alias:
  v: extensions
alias:
  v: user content
alias:
  v: modifiers
min:
  v: 0
max:
  v: *
base:
  path:
    v: BackboneElement.modifierExtension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: true
is modifier reason:
  v: Modifier extensions are expected to modify the meaning or interpretation of the element that contains them
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Device.udiCarrier.deviceIdentifier
path:
  v: Device.udiCarrier.deviceIdentifier
short:
  v: UDI Device Identifier
definition:
  v: The device identifier (DI) is a mandatory, fixed portion of a UDI that identifies the labeler and the specific version or model of a device.
alias:
  v: DI
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Device.udiCarrier.deviceIdentifier
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.what[x]
mapping:
  identity:
    v: rim
  map:
    v: Role.id.extension
mapping:
  identity:
    v: udi
  map:
    v: The device identifier (DI), a mandatory, fixed portion of a UDI that identifies the labeler and the specific version or model of a device.

id:
  v: Device.udiCarrier.issuer
path:
  v: Device.udiCarrier.issuer
short:
  v: UDI Issuing Organization
definition:
  v: Organization that is charged with issuing UDIs for devices. For example, the US FDA issuers include : 1) GS1: http://hl7.org/fhir/NamingSystem/gs1-di, 2) HIBCC: http://hl7.org/fhir/NamingSystem/hibcc-dI, 3) ICCBBA for blood containers: http://hl7.org/fhir/NamingSystem/iccbba-blood-di, 4) ICCBA for other devices: http://hl7.org/fhir/NamingSystem/iccbba-other-di.
alias:
  v: Barcode System
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Device.udiCarrier.issuer
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: uri
    l: uri
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: Role.id.root
mapping:
  identity:
    v: udi
  map:
    v: All UDIs are to be issued under a system operated by an Jurisdiction-accredited issuing agency. GS1 DIs: http://hl7.org/fhir/NamingSystem/gs1 HIBCC DIs: http://hl7.org/fhir/NamingSystem/hibcc ICCBBA DIs for blood containers: http://hl7.org/fhir/NamingSystem/iccbba-blood ICCBA DIs for other devices: http://hl7.org/fhir/NamingSystem/iccbba-other

id:
  v: Device.udiCarrier.jurisdiction
path:
  v: Device.udiCarrier.jurisdiction
short:
  v: Regional UDI authority
definition:
  v: The identity of the authoritative source for UDI generation within a jurisdiction. All UDIs are globally unique within a single namespace with the appropriate repository uri as the system. For example, UDIs of devices managed in the U.S. by the FDA, the value is http://hl7.org/fhir/NamingSystem/fda-udi.
requirements:
  v: Allows a recipient of a UDI to know which database will contain the UDI-associated metadata.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Device.udiCarrier.jurisdiction
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: uri
    l: uri
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: Role.scoper

id:
  v: Device.udiCarrier.carrierAIDC
path:
  v: Device.udiCarrier.carrierAIDC
short:
  v: UDI automatic identification and data capture
definition:
  v: The full UDI carrier of the Automatic Identification and Data Capture (AIDC) technology representation of the barcode string as printed on the packaging of the device - e.g., a barcode or RFID. Because of limitations on character sets in XML and the need to round-trip JSON data through XML, AIDC Formats *SHALL* be base64 encoded.
comment:
  v: The AIDC form of UDIs should be scanned or otherwise used for the identification of the device whenever possible to minimize errors in records resulting from manual transcriptions. If separate barcodes for DI and PI are present, concatenate the string with DI first and in order of human readable expression on label.
alias:
  v: Automatic Identification and Data Capture
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Device.udiCarrier.carrierAIDC
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: base64Binary
    l: base64Binary
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: Role.id.extension
mapping:
  identity:
    v: udi
  map:
    v: A unique device identifier (UDI) on a device label a form that uses automatic identification and data capture (AIDC) technology.

id:
  v: Device.udiCarrier.carrierHRF
path:
  v: Device.udiCarrier.carrierHRF
short:
  v: UDI human-readable form
definition:
  v: The full UDI carrier as the human readable form (HRF) representation of the barcode string as printed on the packaging of the device.
comment:
  v: If separate barcodes for DI and PI are present, concatenate the string with DI first and in order of human readable expression on label.
alias:
  v: Human Readable Form
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Device.udiCarrier.carrierHRF
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: Role.id.extension
mapping:
  identity:
    v: udi
  map:
    v: A unique device identifier (UDI) on a device label in plain text

id:
  v: Device.udiCarrier.entryType
path:
  v: Device.udiCarrier.entryType
short:
  v: barcode | rfid | manual +
definition:
  v: A coded entry to indicate how the data was entered.
requirements:
  v: Supports a way to distinguish hand entered from machine read data.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Device.udiCarrier.entryType
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
    l: code
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: UDIEntryType
  strength:
    v: required
  description:
    v: Codes to identify how UDI data was entered.
  value set:
    v: http://hl7.org/fhir/ValueSet/udi-entry-type|4.0.1
    l: http://hl7.org/fhir/ValueSet/udi-entry-type
mapping:
  identity:
    v: rim
  map:
    v: NA

id:
  v: Device.status
path:
  v: Device.status
short:
  v: Trạng thái thiết bị cấy ghép
definition:
  v: Status of the Device availability.
comment:
  v: This element is labeled as a modifier because the status contains the codes inactive and entered-in-error that mark the device (record)as not currently valid.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Device.status
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
    l: code
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: true
is modifier:
  v: true
is modifier reason:
  v: This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: FHIRDeviceStatus
  strength:
    v: required
  description:
    v: The availability status of the device.
  value set:
    v: http://hl7.org/fhir/ValueSet/device-status|4.0.1
    l: http://hl7.org/fhir/ValueSet/device-status
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.status
mapping:
  identity:
    v: rim
  map:
    v: .statusCode

id:
  v: Device.statusReason
path:
  v: Device.statusReason
short:
  v: online | paused | standby | offline | not-ready | transduc-discon | hw-discon | off
definition:
  v: Reason for the dtatus of the Device availability.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Device.statusReason
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: FHIRDeviceStatusReason
  strength:
    v: extensible
  description:
    v: The availability status reason of the device.
  value set:
    v: http://hl7.org/fhir/ValueSet/device-status-reason|4.0.1
    l: http://hl7.org/fhir/ValueSet/device-status-reason
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.status

id:
  v: Device.distinctIdentifier
path:
  v: Device.distinctIdentifier
short:
  v: Định danh phân biệt thiết bị cấy ghép
definition:
  v: The distinct identification string as required by regulation for a human cell, tissue, or cellular and tissue-based product.
comment:
  v: For example, this applies to devices in the United States regulated under *Code of Federal Regulation 21CFR§1271.290(c)*.
alias:
  v: Distinct Identification Code (DIC)
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Device.distinctIdentifier
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.what[x]
mapping:
  identity:
    v: rim
  map:
    v: .lotNumberText
mapping:
  identity:
    v: udi
  map:
    v: The lot or batch number within which a device was manufactured - which is a component of the production identifier (PI), a conditional, variable portion of a UDI.

id:
  v: Device.manufacturer
path:
  v: Device.manufacturer
short:
  v: Hãng sản xuất
definition:
  v: Tên hãng sản xuất. Các QĐ 5086/QĐ-BYT, 637/2022, 1844/2022, 3181/2022 liên quan mã hãng sản xuất VTYT/TBYT; không model thành mã hàng TBYT đầy đủ trong v0.3.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Device.manufacturer
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.what[x]
mapping:
  identity:
    v: rim
  map:
    v: .playedRole[typeCode=MANU].scoper.name
mapping:
  identity:
    v: udi
  map:
    v: N/A

id:
  v: Device.manufactureDate
path:
  v: Device.manufactureDate
short:
  v: Ngày sản xuất
definition:
  v: The date and time when the device was manufactured.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Device.manufactureDate
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: dateTime
    l: dateTime
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.what[x]
mapping:
  identity:
    v: rim
  map:
    v: .existenceTime.low
mapping:
  identity:
    v: udi
  map:
    v: The date a specific device was manufactured - which is a component of the production identifier (PI), a conditional, variable portion of a UDI. For FHIR, The datetime syntax must converted to YYYY-MM-DD[THH:MM:SS]. If hour is present, the minutes and seconds should both be set to “00”.

id:
  v: Device.expirationDate
path:
  v: Device.expirationDate
short:
  v: Hạn sử dụng
definition:
  v: The date and time beyond which this device is no longer valid or should not be used (if applicable).
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Device.expirationDate
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: dateTime
    l: dateTime
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.what[x]
mapping:
  identity:
    v: rim
  map:
    v: .expirationTime
mapping:
  identity:
    v: udi
  map:
    v: the expiration date of a specific device - which is a component of the production identifier (PI), a conditional, variable portion of a UDI. For FHIR, The datetime syntax must converted to YYYY-MM-DD[THH:MM:SS]. If hour is present, the minutes and seconds should both be set to “00”.

id:
  v: Device.lotNumber
path:
  v: Device.lotNumber
short:
  v: Số lô
definition:
  v: Lot number assigned by the manufacturer.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Device.lotNumber
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.what[x]
mapping:
  identity:
    v: rim
  map:
    v: .lotNumberText
mapping:
  identity:
    v: udi
  map:
    v: The lot or batch number within which a device was manufactured - which is a component of the production identifier (PI), a conditional, variable portion of a UDI.

id:
  v: Device.serialNumber
path:
  v: Device.serialNumber
short:
  v: Số serial
definition:
  v: The serial number assigned by the organization when the device was manufactured.
comment:
  v: Alphanumeric Maximum 20.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Device.serialNumber
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.what[x]
mapping:
  identity:
    v: rim
  map:
    v: .playedRole[typeCode=MANU].id

id:
  v: Device.deviceName
path:
  v: Device.deviceName
short:
  v: The name of the device as given by the manufacturer
definition:
  v: This represents the manufacturer's name of the device as provided by the device, from a UDI label, or by a person describing the Device. This typically would be used when a person provides the name(s) or when the device represents one of the names available from DeviceDefinition.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Device.deviceName
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: BackboneElement
    l: BackboneElement
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false

id:
  v: Device.deviceName.id
path:
  v: Device.deviceName.id
representation:
  v: xmlAttr
short:
  v: Unique id for inter-element referencing
definition:
  v: Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.id
  min:
    v: 0
  max:
    v: 1
type:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type
      l: structuredefinition-fhir-type
    value: Url
      v: string
      l: string
  code:
    v: http://hl7.org/fhirpath/System.String
    l: System.String
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Device.deviceName.extension
path:
  v: Device.deviceName.extension
short:
  v: Additional content defined by implementations
definition:
  v: 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.
comment:
  v: 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.
alias:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Device.deviceName.modifierExtension
path:
  v: Device.deviceName.modifierExtension
short:
  v: Extensions that cannot be ignored even if unrecognized
definition:
  v: 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).
comment:
  v: 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.
requirements:
  v: 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](http://hl7.org/fhir/R4/extensibility.html#modifierExtension).
alias:
  v: extensions
alias:
  v: user content
alias:
  v: modifiers
min:
  v: 0
max:
  v: *
base:
  path:
    v: BackboneElement.modifierExtension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: true
is modifier reason:
  v: Modifier extensions are expected to modify the meaning or interpretation of the element that contains them
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Device.deviceName.name
path:
  v: Device.deviceName.name
short:
  v: The name of the device
definition:
  v: The name of the device.
alias:
  v: Σ
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Device.deviceName.name
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: string
    l: string
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false

id:
  v: Device.deviceName.type
path:
  v: Device.deviceName.type
short:
  v: udi-label-name | user-friendly-name | patient-reported-name | manufacturer-name | model-name | other
definition:
  v: The type of deviceName. UDILabelName | UserFriendlyName | PatientReportedName | ManufactureDeviceName | ModelName.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Device.deviceName.type
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: code
    l: code
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: DeviceNameType
  strength:
    v: required
  description:
    v: The type of name the device is referred by.
  value set:
    v: http://hl7.org/fhir/ValueSet/device-nametype|4.0.1
    l: http://hl7.org/fhir/ValueSet/device-nametype
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.what[x]
mapping:
  identity:
    v: rim
  map:
    v: .playedRole[typeCode=MANU].code

id:
  v: Device.modelNumber
path:
  v: Device.modelNumber
short:
  v: Model / quy cách
definition:
  v: The model number for the device.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Device.modelNumber
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.what[x]
mapping:
  identity:
    v: rim
  map:
    v: .softwareName (included as part)

id:
  v: Device.partNumber
path:
  v: Device.partNumber
short:
  v: The part number of the device
definition:
  v: The part number of the device.
comment:
  v: Alphanumeric Maximum 20.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Device.partNumber
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.what[x]
mapping:
  identity:
    v: rim
  map:
    v: .playedRole[typeCode=MANU].id

id:
  v: Device.type
path:
  v: Device.type
short:
  v: Loại thiết bị cấy ghép
definition:
  v: Loại thiết bị cấy ghép, nên mã hóa bằng SNOMED CT hoặc hệ danh pháp thiết bị đã được governance. Chưa required binding vào QĐ 847/QĐ 3107 trong v0.4.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Device.type
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: false
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: DeviceType
  strength:
    v: example
  description:
    v: Codes to identify medical devices.
  value set:
    v: http://hl7.org/fhir/ValueSet/device-type|4.0.1
    l: http://hl7.org/fhir/ValueSet/device-type

id:
  v: Device.specialization
path:
  v: Device.specialization
short:
  v: The capabilities supported on a device, the standards to which the device conforms for a particular purpose, and used for the communication
definition:
  v: The capabilities supported on a device, the standards to which the device conforms for a particular purpose, and used for the communication.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Device.specialization
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: BackboneElement
    l: BackboneElement
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false

id:
  v: Device.specialization.id
path:
  v: Device.specialization.id
representation:
  v: xmlAttr
short:
  v: Unique id for inter-element referencing
definition:
  v: Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.id
  min:
    v: 0
  max:
    v: 1
type:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type
      l: structuredefinition-fhir-type
    value: Url
      v: string
      l: string
  code:
    v: http://hl7.org/fhirpath/System.String
    l: System.String
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Device.specialization.extension
path:
  v: Device.specialization.extension
short:
  v: Additional content defined by implementations
definition:
  v: 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.
comment:
  v: 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.
alias:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Device.specialization.modifierExtension
path:
  v: Device.specialization.modifierExtension
short:
  v: Extensions that cannot be ignored even if unrecognized
definition:
  v: 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).
comment:
  v: 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.
requirements:
  v: 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](http://hl7.org/fhir/R4/extensibility.html#modifierExtension).
alias:
  v: extensions
alias:
  v: user content
alias:
  v: modifiers
min:
  v: 0
max:
  v: *
base:
  path:
    v: BackboneElement.modifierExtension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: true
is modifier reason:
  v: Modifier extensions are expected to modify the meaning or interpretation of the element that contains them
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Device.specialization.systemType
path:
  v: Device.specialization.systemType
short:
  v: The standard that is used to operate and communicate
definition:
  v: The standard that is used to operate and communicate.
alias:
  v: Σ
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Device.specialization.systemType
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false

id:
  v: Device.specialization.version
path:
  v: Device.specialization.version
short:
  v: The version of the standard that is used to operate and communicate
definition:
  v: The version of the standard that is used to operate and communicate.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Device.specialization.version
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.what[x]

id:
  v: Device.version
path:
  v: Device.version
short:
  v: The actual design of the device or software version running on the device
definition:
  v: The actual design of the device or software version running on the device.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Device.version
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: BackboneElement
    l: BackboneElement
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false

id:
  v: Device.version.id
path:
  v: Device.version.id
representation:
  v: xmlAttr
short:
  v: Unique id for inter-element referencing
definition:
  v: Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.id
  min:
    v: 0
  max:
    v: 1
type:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type
      l: structuredefinition-fhir-type
    value: Url
      v: string
      l: string
  code:
    v: http://hl7.org/fhirpath/System.String
    l: System.String
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Device.version.extension
path:
  v: Device.version.extension
short:
  v: Additional content defined by implementations
definition:
  v: 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.
comment:
  v: 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.
alias:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Device.version.modifierExtension
path:
  v: Device.version.modifierExtension
short:
  v: Extensions that cannot be ignored even if unrecognized
definition:
  v: 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).
comment:
  v: 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.
requirements:
  v: 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](http://hl7.org/fhir/R4/extensibility.html#modifierExtension).
alias:
  v: extensions
alias:
  v: user content
alias:
  v: modifiers
min:
  v: 0
max:
  v: *
base:
  path:
    v: BackboneElement.modifierExtension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: true
is modifier reason:
  v: Modifier extensions are expected to modify the meaning or interpretation of the element that contains them
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Device.version.type
path:
  v: Device.version.type
short:
  v: The type of the device version
definition:
  v: The type of the device version.
alias:
  v: Σ
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Device.version.type
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false

id:
  v: Device.version.component
path:
  v: Device.version.component
short:
  v: A single component of the device version
definition:
  v: A single component of the device version.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Device.version.component
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Identifier
    l: Identifier
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.what[x]

id:
  v: Device.version.value
path:
  v: Device.version.value
short:
  v: The version text
definition:
  v: The version text.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Device.version.value
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: string
    l: string
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false

id:
  v: Device.property
path:
  v: Device.property
short:
  v: The actual configuration settings of a device as it actually operates, e.g., regulation status, time properties
definition:
  v: The actual configuration settings of a device as it actually operates, e.g., regulation status, time properties.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Device.property
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: BackboneElement
    l: BackboneElement
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false

id:
  v: Device.property.id
path:
  v: Device.property.id
representation:
  v: xmlAttr
short:
  v: Unique id for inter-element referencing
definition:
  v: Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.id
  min:
    v: 0
  max:
    v: 1
type:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type
      l: structuredefinition-fhir-type
    value: Url
      v: string
      l: string
  code:
    v: http://hl7.org/fhirpath/System.String
    l: System.String
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Device.property.extension
path:
  v: Device.property.extension
short:
  v: Additional content defined by implementations
definition:
  v: 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.
comment:
  v: 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.
alias:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Device.property.modifierExtension
path:
  v: Device.property.modifierExtension
short:
  v: Extensions that cannot be ignored even if unrecognized
definition:
  v: 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).
comment:
  v: 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.
requirements:
  v: 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](http://hl7.org/fhir/R4/extensibility.html#modifierExtension).
alias:
  v: extensions
alias:
  v: user content
alias:
  v: modifiers
min:
  v: 0
max:
  v: *
base:
  path:
    v: BackboneElement.modifierExtension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: true
is modifier reason:
  v: Modifier extensions are expected to modify the meaning or interpretation of the element that contains them
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Device.property.type
path:
  v: Device.property.type
short:
  v: Code that specifies the property DeviceDefinitionPropetyCode (Extensible)
definition:
  v: Code that specifies the property DeviceDefinitionPropetyCode (Extensible).
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Device.property.type
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false

id:
  v: Device.property.valueQuantity
path:
  v: Device.property.valueQuantity
short:
  v: Property value as a quantity
definition:
  v: Property value as a quantity.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Device.property.valueQuantity
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Quantity
    l: Quantity
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false

id:
  v: Device.property.valueCode
path:
  v: Device.property.valueCode
short:
  v: Property value as a code, e.g., NTP4 (synced to NTP)
definition:
  v: Property value as a code, e.g., NTP4 (synced to NTP).
min:
  v: 0
max:
  v: *
base:
  path:
    v: Device.property.valueCode
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false

id:
  v: Device.patient
path:
  v: Device.patient
short:
  v: Bệnh nhân đang/đã được cấy ghép thiết bị
definition:
  v: Bệnh nhân gắn với thiết bị cấy ghép. Đây là điểm khác với VNCoreDevice nền, vốn vẫn hỗ trợ thiết bị chưa gắn người bệnh hoặc vật tư/thiết bị trong dữ liệu thanh toán.
requirements:
  v: If the device is implanted in a patient, then need to associate the device to the patient.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Device.patient
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://fhir.hl7.org.vn/core/StructureDefinition/vn-core-patient
    l: vn-core-patient
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.subject[x]
mapping:
  identity:
    v: rim
  map:
    v: .playedRole[typeCode=USED].scoper.playedRole[typeCode=PAT]
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.subject

id:
  v: Device.owner
path:
  v: Device.owner
short:
  v: Organization responsible for device
definition:
  v: An organization that is responsible for the provision and ongoing maintenance of the device.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Device.owner
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Organization|4.0.1
    l: http://hl7.org/fhir/StructureDefinition/Organization
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.source
mapping:
  identity:
    v: rim
  map:
    v: .playedRole[typeCode=OWN].scoper

id:
  v: Device.contact
path:
  v: Device.contact
short:
  v: Details for human/organization for support
definition:
  v: Contact details for an organization or a particular human that is responsible for the device.
comment:
  v: used for troubleshooting etc.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Device.contact
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: ContactPoint
    l: ContactPoint
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.source
mapping:
  identity:
    v: rim
  map:
    v: .scopedRole[typeCode=CON].player

id:
  v: Device.location
path:
  v: Device.location
short:
  v: Where the device is found
definition:
  v: The place where the device can be found.
requirements:
  v: Device.location can be used to track device location.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Device.location
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Location|4.0.1
    l: http://hl7.org/fhir/StructureDefinition/Location
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.where[x]
mapping:
  identity:
    v: rim
  map:
    v: .playedRole[typeCode=LOCE].scoper

id:
  v: Device.url
path:
  v: Device.url
short:
  v: Network address to contact device
definition:
  v: A network address on which the device may be contacted directly.
comment:
  v: If the device is running a FHIR server, the network address should be the Base URL from which a conformance statement may be retrieved.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Device.url
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: uri
    l: uri
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.where[x]
mapping:
  identity:
    v: rim
  map:
    v: .telecom

id:
  v: Device.note
path:
  v: Device.note
short:
  v: Ghi chú (tên VTYT, quy cách...)
definition:
  v: Descriptive information, usage information or implantation information that is not captured in an existing element.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Device.note
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Annotation
    l: Annotation
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: .text

id:
  v: Device.safety
path:
  v: Device.safety
short:
  v: Thông tin an toàn của thiết bị cấy ghép
definition:
  v: Provides additional safety characteristics about a medical device. For example devices containing latex.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Device.safety
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: NA

id:
  v: Device.parent
path:
  v: Device.parent
short:
  v: The parent device
definition:
  v: The parent device.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Device.parent
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Device|4.0.1
    l: http://hl7.org/fhir/StructureDefinition/Device
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false

element:
  id:
    v: Device
  path:
    v: Device
  constraint:
    key:
      v: vn-implant-udi-carrier-content
    severity:
      v: warning
    human:
      v: Nếu ghi nhận UDI carrier cho thiết bị cấy ghép, nên có ít nhất HRF hoặc AIDC để hỗ trợ truy xuất và quét mã.
    expression:
      v: udiCarrier.empty() or udiCarrier.all(carrierHRF.exists() or carrierAIDC.exists())
    source:
      v: http://fhir.hl7.org.vn/core/StructureDefinition/vn-core-implantable-device
      l: vn-core-implantable-device
  constraint:
    key:
      v: vn-implant-regnum-class-cd
    severity:
      v: warning
    human:
      v: Thiết bị cấy ghép loại C hoặc D theo NĐ 98/2021/NĐ-CP Điều 4 (đã được sửa đổi, bổ sung bởi NĐ 07/2023/NĐ-CP và NĐ 04/2025/NĐ-CP) phải có số lưu hành TBYT do Bộ Y tế cấp. Cảnh báo nếu thiếu.
    expression:
      v: extension('http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-device-risk-class').value.coding.where(code = 'C' or code = 'D').empty() or extension('http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-device-registration-number').exists()
    source:
      v: http://fhir.hl7.org.vn/core/StructureDefinition/vn-core-implantable-device
      l: vn-core-implantable-device
element:
  id:
    v: Device.extension:riskClass
  path:
    v: Device.extension
  slice name:
    v: riskClass
  short:
    v: Phân loại rủi ro A/B/C/D — Must Support cho thiết bị cấy ghép
  must support:
    v: true
element:
  id:
    v: Device.extension:registrationNumber
  path:
    v: Device.extension
  slice name:
    v: registrationNumber
  short:
    v: Số lưu hành TBYT — Must Support cho thiết bị cấy ghép C/D
  must support:
    v: true
element:
  id:
    v: Device.udiCarrier
  path:
    v: Device.udiCarrier
  short:
    v: UDI carrier của thiết bị cấy ghép khi có
element:
  id:
    v: Device.udiCarrier.carrierAIDC
  path:
    v: Device.udiCarrier.carrierAIDC
  short:
    v: UDI automatic identification and data capture
  must support:
    v: true
element:
  id:
    v: Device.status
  path:
    v: Device.status
  short:
    v: Trạng thái thiết bị cấy ghép
element:
  id:
    v: Device.modelNumber
  path:
    v: Device.modelNumber
  short:
    v: Model / quy cách
element:
  id:
    v: Device.type
  path:
    v: Device.type
  short:
    v: Loại thiết bị cấy ghép
  definition:
    v: Loại thiết bị cấy ghép, nên mã hóa bằng SNOMED CT hoặc hệ danh pháp thiết bị đã được governance. Chưa required binding vào QĐ 847/QĐ 3107 trong v0.4.
  min:
    v: 1
element:
  id:
    v: Device.patient
  path:
    v: Device.patient
  short:
    v: Bệnh nhân đang/đã được cấy ghép thiết bị
  definition:
    v: Bệnh nhân gắn với thiết bị cấy ghép. Đây là điểm khác với VNCoreDevice nền, vốn vẫn hỗ trợ thiết bị chưa gắn người bệnh hoặc vật tư/thiết bị trong dữ liệu thanh toán.
  min:
    v: 1
element:
  id:
    v: Device.safety
  path:
    v: Device.safety
  short:
    v: Thông tin an toàn của thiết bị cấy ghép
  must support:
    v: true