@prefix fhir: <http://hl7.org/fhir/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

# - resource -------------------------------------------------------------------

<http://fhir.hl7.org.vn/core/CodeSystem/vn-data-party-role-cs> a fhir:CodeSystem ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:Resource.id [ fhir:value "vn-data-party-role-cs"] ;
  fhir:Resource.language [ fhir:value "vi"] ;
  fhir:DomainResource.text [
     fhir:Narrative.status [ fhir:value "generated" ] ;
     fhir:Narrative.div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: CodeSystem vn-data-party-role-cs</b></p><a name=\"vn-data-party-role-cs\"> </a><a name=\"hcvn-data-party-role-cs\"> </a><p>This case-sensitive code system <code>http://fhir.hl7.org.vn/core/CodeSystem/vn-data-party-role-cs</code> defines the following codes:</p><table class=\"codes\"><tr><td style=\"white-space:nowrap\"><b>Code</b></td><td><b>Display</b></td><td><b>Definition</b></td><td><b>English (English, en)</b></td></tr><tr><td style=\"white-space:nowrap\">controller<a name=\"vn-data-party-role-cs-controller\"> </a></td><td>Bên kiểm soát dữ liệu cá nhân</td><td>Cơ quan, tổ chức, cá nhân quyết định mục đích và phương tiện xử lý dữ liệu cá nhân — Luật 91/2025/QH15 Điều 2 khoản 7.</td><td>Personal data controller</td></tr><tr><td style=\"white-space:nowrap\">processor<a name=\"vn-data-party-role-cs-processor\"> </a></td><td>Bên xử lý dữ liệu cá nhân</td><td>Cơ quan, tổ chức, cá nhân thực hiện xử lý theo yêu cầu của bên kiểm soát hoặc bên kiểm soát và xử lý thông qua hợp đồng — Luật 91/2025/QH15 Điều 2 khoản 8.</td><td>Personal data processor</td></tr><tr><td style=\"white-space:nowrap\">controller-processor<a name=\"vn-data-party-role-cs-controller-processor\"> </a></td><td>Bên kiểm soát và xử lý dữ liệu cá nhân</td><td>Cơ quan, tổ chức, cá nhân quyết định mục đích, phương tiện VÀ trực tiếp xử lý dữ liệu cá nhân — Luật 91/2025/QH15 Điều 2 khoản 9. Vai trò thường gặp nhất của CSKCB Việt Nam.</td><td>Personal data controller-processor</td></tr><tr><td style=\"white-space:nowrap\">third-party<a name=\"vn-data-party-role-cs-third-party\"> </a></td><td>Bên thứ ba</td><td>Tổ chức, cá nhân ngoài chủ thể dữ liệu và ba bên nêu trên, tham gia xử lý dữ liệu cá nhân theo quy định của pháp luật — Luật 91/2025/QH15 Điều 2 khoản 10.</td><td>Third party</td></tr></table></div>"
  ] ;
  fhir:DomainResource.extension [
     fhir:index -1 ;
     fhir:Extension.url [ fhir:value "http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-legal-basis" ] ;
     fhir:Extension.valueCoding [
       fhir:Element.extension [
         fhir:index -1 ;
         fhir:Extension.url [ fhir:value "http://fhir.hl7.org.vn/core/StructureDefinition/vn-ext-legal-basis-role" ] ;
         fhir:Extension.valueCode [ fhir:value "issuing" ]
       ] ;
       fhir:Coding.system [ fhir:value "http://fhir.hl7.org.vn/core/CodeSystem/vn-legal-document-ref-cs" ] ;
       fhir:Coding.code [ fhir:value "L-91-2025" ]
     ]
  ] ;
  fhir:CodeSystem.url [ fhir:value "http://fhir.hl7.org.vn/core/CodeSystem/vn-data-party-role-cs"] ;
  fhir:CodeSystem.identifier [
     fhir:index -1 ;
     fhir:Identifier.system [ fhir:value "urn:ietf:rfc:3986" ] ;
     fhir:Identifier.value [ fhir:value "urn:oid:2.25.161089673617632664299011809196868855799.16.31" ]
  ] ;
  fhir:CodeSystem.version [ fhir:value "0.10.0"] ;
  fhir:CodeSystem.name [ fhir:value "VNDataPartyRoleCS"] ;
  fhir:CodeSystem.title [ fhir:value "Vai trò các bên xử lý dữ liệu cá nhân — Personal Data Party Role CodeSystem"] ;
  fhir:CodeSystem.status [ fhir:value "active"] ;
  fhir:CodeSystem.experimental [ fhir:value "false"^^xsd:boolean] ;
  fhir:CodeSystem.date [ fhir:value "2026-08-05"^^xsd:date] ;
  fhir:CodeSystem.publisher [ fhir:value "Omi HealthTech / VN Core FHIR Community Initiative"] ;
  fhir:CodeSystem.contact [
     fhir:index -1 ;
     fhir:ContactDetail.name [ fhir:value "Omi HealthTech / VN Core FHIR Community Initiative" ] ;
     fhir:ContactDetail.telecom [
       fhir:index -1 ;
       fhir:ContactPoint.system [ fhir:value "url" ] ;
       fhir:ContactPoint.value [ fhir:value "https://hl7.org.vn" ]
     ], [
       fhir:index -1 ;
       fhir:ContactPoint.system [ fhir:value "email" ] ;
       fhir:ContactPoint.value [ fhir:value "info@hl7.org.vn" ]
     ]
  ], [
     fhir:index -1 ;
     fhir:ContactDetail.name [ fhir:value "Omi HealthTech (OmiGroup)" ] ;
     fhir:ContactDetail.telecom [
       fhir:index -1 ;
       fhir:ContactPoint.system [ fhir:value "url" ] ;
       fhir:ContactPoint.value [ fhir:value "https://omihealthtech.vn" ]
     ], [
       fhir:index -1 ;
       fhir:ContactPoint.system [ fhir:value "url" ] ;
       fhir:ContactPoint.value [ fhir:value "https://omigroup.vn" ]
     ], [
       fhir:index -1 ;
       fhir:ContactPoint.system [ fhir:value "email" ] ;
       fhir:ContactPoint.value [ fhir:value "info@hl7.org.vn" ]
     ]
  ] ;
  fhir:CodeSystem.description [ fhir:value "Bốn vai trò trong xử lý dữ liệu cá nhân theo **Luật 91/2025/QH15 Điều 2**: bên kiểm\nsoát (khoản 7), bên xử lý (khoản 8), bên kiểm soát và xử lý (khoản 9), bên thứ ba (khoản 10).\nRanh giới do luật vạch theo *quyền quyết định mục đích và phương tiện xử lý*, không theo quy mô hay\nloại hình tổ chức: một bệnh viện tự quyết định mục đích và trực tiếp xử lý là *bên kiểm soát và xử\nlý*; một nhà cung cấp hạ tầng chỉ xử lý theo hợp đồng là *bên xử lý*.\nKhi thông báo cho chủ thể lúc xin sự đồng ý, Luật 91/2025/QH15 Điều 9 khoản 2 điểm b chỉ nêu hai\nvai trò: bên kiểm soát, hoặc bên kiểm soát và xử lý — xem invariant `vn-consent-disclosed-controller-role`."] ;
  fhir:CodeSystem.jurisdiction [
     fhir:index -1 ;
     fhir:CodeableConcept.coding [
       fhir:index -1 ;
       fhir:Coding.system [ fhir:value "urn:iso:std:iso:3166" ] ;
       fhir:Coding.code [ fhir:value "VN" ] ;
       fhir:Coding.display [ fhir:value "Viet Nam" ]
     ]
  ] ;
  fhir:CodeSystem.purpose [ fhir:value "Mã trong bộ này là ĐỊNH DANH KỸ THUẬT do VN Core đặt để tham chiếu ổn định trong hồ sơ FHIR — văn bản pháp luật nêu ở căn cứ quy định nội dung của từng khái niệm nhưng không ban hành bộ mã. Khi đối chiếu với văn bản, tra theo `display` và `definition`, không tra theo `code`."] ;
  fhir:CodeSystem.copyright [ fhir:value "Quốc hội Việt Nam — Luật 91/2025/QH15 Điều 2."] ;
  fhir:CodeSystem.caseSensitive [ fhir:value "true"^^xsd:boolean] ;
  fhir:CodeSystem.content [ fhir:value "complete"] ;
  fhir:CodeSystem.count [ fhir:value "4"^^xsd:nonNegativeInteger] ;
  fhir:CodeSystem.concept [
     fhir:index -1 ;
     fhir:CodeSystem.concept.code [ fhir:value "controller" ] ;
     fhir:CodeSystem.concept.display [ fhir:value "Bên kiểm soát dữ liệu cá nhân" ] ;
     fhir:CodeSystem.concept.definition [ fhir:value "Cơ quan, tổ chức, cá nhân quyết định mục đích và phương tiện xử lý dữ liệu cá nhân — Luật 91/2025/QH15 Điều 2 khoản 7." ] ;
     fhir:CodeSystem.concept.designation [
       fhir:index -1 ;
       fhir:CodeSystem.concept.designation.language [ fhir:value "en" ] ;
       fhir:CodeSystem.concept.designation.value [ fhir:value "Personal data controller" ]
     ]
  ], [
     fhir:index -1 ;
     fhir:CodeSystem.concept.code [ fhir:value "processor" ] ;
     fhir:CodeSystem.concept.display [ fhir:value "Bên xử lý dữ liệu cá nhân" ] ;
     fhir:CodeSystem.concept.definition [ fhir:value "Cơ quan, tổ chức, cá nhân thực hiện xử lý theo yêu cầu của bên kiểm soát hoặc bên kiểm soát và xử lý thông qua hợp đồng — Luật 91/2025/QH15 Điều 2 khoản 8." ] ;
     fhir:CodeSystem.concept.designation [
       fhir:index -1 ;
       fhir:CodeSystem.concept.designation.language [ fhir:value "en" ] ;
       fhir:CodeSystem.concept.designation.value [ fhir:value "Personal data processor" ]
     ]
  ], [
     fhir:index -1 ;
     fhir:CodeSystem.concept.code [ fhir:value "controller-processor" ] ;
     fhir:CodeSystem.concept.display [ fhir:value "Bên kiểm soát và xử lý dữ liệu cá nhân" ] ;
     fhir:CodeSystem.concept.definition [ fhir:value "Cơ quan, tổ chức, cá nhân quyết định mục đích, phương tiện VÀ trực tiếp xử lý dữ liệu cá nhân — Luật 91/2025/QH15 Điều 2 khoản 9. Vai trò thường gặp nhất của CSKCB Việt Nam." ] ;
     fhir:CodeSystem.concept.designation [
       fhir:index -1 ;
       fhir:CodeSystem.concept.designation.language [ fhir:value "en" ] ;
       fhir:CodeSystem.concept.designation.value [ fhir:value "Personal data controller-processor" ]
     ]
  ], [
     fhir:index -1 ;
     fhir:CodeSystem.concept.code [ fhir:value "third-party" ] ;
     fhir:CodeSystem.concept.display [ fhir:value "Bên thứ ba" ] ;
     fhir:CodeSystem.concept.definition [ fhir:value "Tổ chức, cá nhân ngoài chủ thể dữ liệu và ba bên nêu trên, tham gia xử lý dữ liệu cá nhân theo quy định của pháp luật — Luật 91/2025/QH15 Điều 2 khoản 10." ] ;
     fhir:CodeSystem.concept.designation [
       fhir:index -1 ;
       fhir:CodeSystem.concept.designation.language [ fhir:value "en" ] ;
       fhir:CodeSystem.concept.designation.value [ fhir:value "Third party" ]
     ]
  ] .

# - ontology header ------------------------------------------------------------

<http://fhir.hl7.org.vn/core/CodeSystem/vn-data-party-role-cs.ttl> a owl:Ontology ;
  owl:imports fhir:fhir.ttl .

# -------------------------------------------------------------------------------------

