HL7 Vietnam VN Core FHIR Implementation Guide

Bộ Hướng dẫn Triển khai Core FHIR cho Việt Nam
0.8.0 - Draft for Community Review Viet Nam cờ

Bộ Hướng dẫn Triển khai Core FHIR cho Việt Nam - Draft for Community Review (v0.8.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions

: Bảng 7 giấy ra viện — XML7 Discharge Paper Logical Model — StructureMap

Draft tại thời điểm 2026-04-28

Bản thô ttl | Tải xuống

@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://hl7.org/fhir/StructureMap/vn-sm-bhyt-xml7-discharge-paper> a fhir:StructureMap ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:Resource.id [ fhir:value "vn-sm-bhyt-xml7-discharge-paper"] ;
  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: StructureMap vn-sm-bhyt-xml7-discharge-paper</b></p><a name=\"vn-sm-bhyt-xml7-discharge-paper\"> </a><a name=\"hcvn-sm-bhyt-xml7-discharge-paper\"> </a><pre class=\"fml\">#xD;\n<b>map</b><span style=\"color: navy\"> \"</span>http://fhir.hl7.org.vn/core/StructureMap/vn-sm-bhyt-xml7-discharge-paper<span style=\"color: navy\">\" = \"</span>BHYTXML7DischargePaperLMStructureMap<span style=\"color: navy\">\"#xD;\n#xD;\n</span><span style=\"color: navy\">// </span><span style=\"color: green\">Generated StructureMap scaffold for Bảng 7 giấy ra viện — XML7 Discharge Paper Logical Model. Source semantics come from the logical model mapping annotations in `BHYTXML7DischargePaperLM.fsh` and remain aligned with the Python BHYT round-trip export adapter.</span>#xD;\n#xD;\n<span style=\"color: navy\">// </span><span style=\"color: green\">FHIR-native source bundle profile used by the repository round-trip adapter.</span>#xD;\n<b>uses</b><span style=\"color: navy\"> \"</span><a href=\"StructureDefinition-vn-core-bhyt-submission-bundle.html\" title=\"Bundle hồ sơ thanh toán BHYT — VN Core BHYT Submission Bundle\">http://fhir.hl7.org.vn/core/StructureDefinition/vn-core-bhyt-submission-bundle</a><span style=\"color: navy\">\" </span><b>alias </b>BHYTSubmissionBundle <b>as </b><b>source</b>#xD;\n<span style=\"color: navy\">// </span><span style=\"color: green\">Bảng 7 giấy ra viện — XML7 Discharge Paper Logical Model</span>#xD;\n<b>uses</b><span style=\"color: navy\"> \"</span><a href=\"StructureDefinition-bhytXml7DischargePaperLm.html\" title=\"Bảng 7 giấy ra viện — XML7 Discharge Paper Logical Model\">http://fhir.hl7.org.vn/core/StructureDefinition/bhytXml7DischargePaperLm</a><span style=\"color: navy\">\" </span><b>alias </b>BHYTXML7DischargePaperLM <b>as </b><b>target</b>#xD;\n#xD;\n<span style=\"color: navy\">// </span><span style=\"color: green\">Rows are derived from discharge Composition/DocumentReference, the linked Encounter, Condition, Practitioner and guardian/temporary card data. Generated from logical-model `^mapping` annotations. Fields still missing a field-level `^mapping.map` entry remain outside this StructureMap and are tracked in `wiki/mappings/bhyt-output-data/machine/structuremap-coverage.json`.</span>#xD;\n<b>group </b>MapBHYTXML7DischargePaperLM<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">sourceBundle</span><span style=\"color: navy\"> : </span>BHYTSubmissionBundle, <b>target</b> <span style=\"color: maroon\">targetRow</span><span style=\"color: navy\"> : </span>BHYTXML7DischargePaperLM<span style=\"color: navy\">)</span><span style=\"color: navy\"> {#xD;\n</span>  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: MA_LK - Mã liên kết hồ sơ FHIR path: VNCoreClaim.identifier[MALK].value</span>#xD;\n  sourceBundle.entry 0<span style=\"color: navy\">..</span>*<b> as </b><span style=\"color: maroon\">maLkSource</span><span style=\"color: navy\"><b> -&gt; </b></span>targetRow.maLk <i>\"maLk\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: SO_LUU_TRU - Số lưu trữ/số hồ sơ bệnh án FHIR path: VNCoreComposition.identifier.value | VNCoreDocumentReference.identifier.value</span>#xD;\n  sourceBundle.entry 0<span style=\"color: navy\">..</span>*<b> as </b><span style=\"color: maroon\">soLuuTruSource</span><span style=\"color: navy\"><b> -&gt; </b></span>targetRow.soLuuTru <i>\"soLuuTru\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: MA_YTE - Mã y tế/mã người bệnh FHIR path: VNCorePatient.identifier[MRN].value</span>#xD;\n  sourceBundle.entry 0<span style=\"color: navy\">..</span>*<b> as </b><span style=\"color: maroon\">maYteSource</span><span style=\"color: navy\"><b> -&gt; </b></span>targetRow.maYte <i>\"maYte\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: MA_KHOA_RV - Mã khoa ra viện/tổng kết FHIR path: VNCoreEncounter.location.location.resolve().identifier.value | VNCoreOrganizationDepartment.identifier.value</span>#xD;\n  sourceBundle.entry 0<span style=\"color: navy\">..</span>*<b> as </b><span style=\"color: maroon\">maKhoaRvSource</span><span style=\"color: navy\"><b> -&gt; </b></span>targetRow.maKhoaRv <i>\"maKhoaRv\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: NGAY_VAO - Ngày vào viện FHIR path: VNCoreEncounter.period.start</span>#xD;\n  sourceBundle.entry 0<span style=\"color: navy\">..</span>*<b> as </b><span style=\"color: maroon\">ngayVaoSource</span><span style=\"color: navy\"><b> -&gt; </b></span>targetRow.ngayVao <i>\"ngayVao\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: NGAY_RA - Ngày ra viện FHIR path: VNCoreEncounter.period.end | VNCoreComposition.date</span>#xD;\n  sourceBundle.entry 0<span style=\"color: navy\">..</span>*<b> as </b><span style=\"color: maroon\">ngayRaSource</span><span style=\"color: navy\"><b> -&gt; </b></span>targetRow.ngayRa <i>\"ngayRa\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: MA_DINH_CHI_THAI - Mã đình chỉ thai FHIR path: VNCoreProcedure.code | VNCoreCondition.code Mapping note: MA_DINH_CHI_THAI='1' (đình chỉ thai nghén) tương ứng với sự tồn tại một VNCoreProcedure đình chỉ thai nghén (termination of pregnancy); '0' là không đình chỉ. Chưa có slice/mã cố định cho thủ thuật đình chỉ thai nên dùng Procedure.code; quan hệ điều kiện với 3 trường chi tiết theo invariant bhyt-xml7-abortion-fields-required (nhất quán nhóm đình chỉ thai với BHYTXML11SickLeaveLM).</span>#xD;\n  sourceBundle.entry 0<span style=\"color: navy\">..</span>*<b> as </b><span style=\"color: maroon\">maDinhChiThaiSource</span><span style=\"color: navy\"><b> -&gt; </b></span>targetRow.maDinhChiThai <i>\"maDinhChiThai\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: NGUYENNHAN_DINHCHI - Nguyên nhân đình chỉ thai FHIR path: VNCoreProcedure.reasonCode.text | VNCoreProcedure.reasonReference.resolve().code | VNCoreCondition.code Mapping note: Nguyên nhân đình chỉ thai nghén — ghi dạng text hoặc mã ICD-10 chẩn đoán liên quan (VNCoreCondition); trường hợp bất thường/bệnh lý thai nhi tham chiếu danh mục VNFetalSexDisclosureDiseaseVS (căn cứ TT 11/2026/TT-BYT). Bắt buộc khi MA_DINH_CHI_THAI='1' (invariant bhyt-xml7-abortion-fields-required).</span>#xD;\n  sourceBundle.entry 0<span style=\"color: navy\">..</span>*<b> as </b><span style=\"color: maroon\">nguyenNhanDinhChiSource</span><span style=\"color: navy\"><b> -&gt; </b></span>targetRow.nguyenNhanDinhChi <i>\"nguyenNhanDinhChi\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: THOIGIAN_DINHCHI - Thời gian đình chỉ thai FHIR path: VNCoreProcedure.performedDateTime Mapping note: Thời điểm thực hiện đình chỉ thai nghén (định dạng yyyymmddHHMM). Bắt buộc khi MA_DINH_CHI_THAI='1' (invariant bhyt-xml7-abortion-fields-required).</span>#xD;\n  sourceBundle.entry 0<span style=\"color: navy\">..</span>*<b> as </b><span style=\"color: maroon\">thoiGianDinhChiSource</span><span style=\"color: navy\"><b> -&gt; </b></span>targetRow.thoiGianDinhChi <i>\"thoiGianDinhChi\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: TUOI_THAI - Tuổi thai FHIR path: VNCoreProcedure | future tuổi-thai gestational-age extension Mapping note: Tuần tuổi thai thực tế (1–42 tuần) tại thời điểm đình chỉ. FHIR base không có phần tử tuổi thai trên Procedure nên đích mã hoá qua extension gestational-age để future (hoặc Observation LOINC 18185-9). Bắt buộc khi MA_DINH_CHI_THAI='1' (invariant bhyt-xml7-abortion-fields-required).</span>#xD;\n  sourceBundle.entry 0<span style=\"color: navy\">..</span>*<b> as </b><span style=\"color: maroon\">tuoiThaiSource</span><span style=\"color: navy\"><b> -&gt; </b></span>targetRow.tuoiThai <i>\"tuoiThai\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: CHAN_DOAN_RV - Chẩn đoán ra viện FHIR path: VNCoreComposition.section[diagnosis].entry.resolve().code | VNCoreCondition.code | section.text</span>#xD;\n  sourceBundle.entry 0<span style=\"color: navy\">..</span>*<b> as </b><span style=\"color: maroon\">chanDoanRvSource</span><span style=\"color: navy\"><b> -&gt; </b></span>targetRow.chanDoanRv <i>\"chanDoanRv\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: PP_DIEUTRI - Phương pháp điều trị (nội khoa, ngoại khoa, xạ trị, hoá trị hoặc kết hợp) FHIR path: VNCoreComposition.section[dischargeSummary].text | VNCoreProcedure.category | future phương-pháp-điều-trị extension Mapping note: Ghi phương pháp điều trị (nội khoa, ngoại khoa, xạ trị, hoá trị hoặc xạ trị kết hợp nội khoa) theo hướng dẫn TT 18/2022/TT-BYT. QĐ 4750/QĐ-BYT (trong chuẩn QĐ 3176/QĐ-BYT) sửa đổi toàn bộ diễn giải và tăng kích thước tối đa lên n ký tự. Chưa có code system phương pháp điều trị riêng nên đích mã hoá tạm để future extension.</span>#xD;\n  sourceBundle.entry 0<span style=\"color: navy\">..</span>*<b> as </b><span style=\"color: maroon\">ppDieuTriSource</span><span style=\"color: navy\"><b> -&gt; </b></span>targetRow.ppDieuTri <i>\"ppDieuTri\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: GHI_CHU - Ghi chú FHIR path: VNCoreDocumentReference.description | VNCoreComposition.section.text</span>#xD;\n  sourceBundle.entry 0<span style=\"color: navy\">..</span>*<b> as </b><span style=\"color: maroon\">ghiChuSource</span><span style=\"color: navy\"><b> -&gt; </b></span>targetRow.ghiChu <i>\"ghiChu\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: MA_TTDV - Mã thủ trưởng đơn vị/người ký FHIR path: VNCoreComposition.attester.party.resolve().identifier.value | VNCoreDocumentReference.authenticator.resolve().identifier.value</span>#xD;\n  sourceBundle.entry 0<span style=\"color: navy\">..</span>*<b> as </b><span style=\"color: maroon\">maTtdvSource</span><span style=\"color: navy\"><b> -&gt; </b></span>targetRow.maTtdv <i>\"maTtdv\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: MA_BS - Mã bác sĩ FHIR path: VNCoreComposition.author.resolve().identifier.value | VNCorePractitioner.identifier.value</span>#xD;\n  sourceBundle.entry 0<span style=\"color: navy\">..</span>*<b> as </b><span style=\"color: maroon\">maBsSource</span><span style=\"color: navy\"><b> -&gt; </b></span>targetRow.maBs <i>\"maBs\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: TEN_BS - Tên bác sĩ FHIR path: VNCoreComposition.author.display | VNCorePractitioner.name.text</span>#xD;\n  sourceBundle.entry 0<span style=\"color: navy\">..</span>*<b> as </b><span style=\"color: maroon\">tenBsSource</span><span style=\"color: navy\"><b> -&gt; </b></span>targetRow.tenBs <i>\"tenBs\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: NGAY_CT - Ngày cấp chứng từ FHIR path: VNCoreDocumentReference.date | VNCoreComposition.date</span>#xD;\n  sourceBundle.entry 0<span style=\"color: navy\">..</span>*<b> as </b><span style=\"color: maroon\">ngayCtSource</span><span style=\"color: navy\"><b> -&gt; </b></span>targetRow.ngayCt <i>\"ngayCt\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: MA_CHA - Mã cha FHIR path: VNCoreRelatedPerson.where(relationship.coding.code='FTH').identifier[CCCD].value | VNCorePatient.contact.where(relationship.coding.code='FTH').name</span>#xD;\n  sourceBundle.entry 0<span style=\"color: navy\">..</span>*<b> as </b><span style=\"color: maroon\">maChaSource</span><span style=\"color: navy\"><b> -&gt; </b></span>targetRow.maCha <i>\"maCha\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: MA_ME - Mã mẹ FHIR path: VNCoreRelatedPerson.where(relationship.coding.code='MTH').identifier[CCCD].value | VNCorePatient.contact.where(relationship.coding.code='MTH').name</span>#xD;\n  sourceBundle.entry 0<span style=\"color: navy\">..</span>*<b> as </b><span style=\"color: maroon\">maMeSource</span><span style=\"color: navy\"><b> -&gt; </b></span>targetRow.maMe <i>\"maMe\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: MA_THE_TAM - Mã thẻ tạm FHIR path: VNCoreCoverage.identifier.value Mapping note: Temporary card identifiers are kept as Coverage.identifier until a dedicated temporary-card slice is profiled.</span>#xD;\n  sourceBundle.entry 0<span style=\"color: navy\">..</span>*<b> as </b><span style=\"color: maroon\">maTheTamSource</span><span style=\"color: navy\"><b> -&gt; </b></span>targetRow.maTheTam <i>\"maTheTam\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: HO_TEN_CHA - Họ tên cha FHIR path: VNCoreRelatedPerson.where(relationship.coding.code='FTH').name.text | VNCorePatient.contact.where(relationship.coding.code='FTH').name.text</span>#xD;\n  sourceBundle.entry 0<span style=\"color: navy\">..</span>*<b> as </b><span style=\"color: maroon\">hoTenChaSource</span><span style=\"color: navy\"><b> -&gt; </b></span>targetRow.hoTenCha <i>\"hoTenCha\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: HO_TEN_ME - Họ tên mẹ FHIR path: VNCoreRelatedPerson.where(relationship.coding.code='MTH').name.text | VNCorePatient.contact.where(relationship.coding.code='MTH').name.text</span>#xD;\n  sourceBundle.entry 0<span style=\"color: navy\">..</span>*<b> as </b><span style=\"color: maroon\">hoTenMeSource</span><span style=\"color: navy\"><b> -&gt; </b></span>targetRow.hoTenMe <i>\"hoTenMe\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: SO_NGAY_NGHI - Số ngày nghỉ FHIR path: Derived from VNCoreDocumentReference.context.period | VNCoreComposition.event.period</span>#xD;\n  sourceBundle.entry 0<span style=\"color: navy\">..</span>*<b> as </b><span style=\"color: maroon\">soNgayNghiSource</span><span style=\"color: navy\"><b> -&gt; </b></span>targetRow.soNgayNghi <i>\"soNgayNghi\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: NGOAITRU_TUNGAY - Ngoại trú từ ngày FHIR path: VNCoreDocumentReference.context.period.start | VNCoreComposition.event.period.start</span>#xD;\n  sourceBundle.entry 0<span style=\"color: navy\">..</span>*<b> as </b><span style=\"color: maroon\">ngoaiTruTuNgaySource</span><span style=\"color: navy\"><b> -&gt; </b></span>targetRow.ngoaiTruTuNgay <i>\"ngoaiTruTuNgay\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: NGOAITRU_DENNGAY - Ngoại trú đến ngày FHIR path: VNCoreDocumentReference.context.period.end | VNCoreComposition.event.period.end</span>#xD;\n  sourceBundle.entry 0<span style=\"color: navy\">..</span>*<b> as </b><span style=\"color: maroon\">ngoaiTruDenNgaySource</span><span style=\"color: navy\"><b> -&gt; </b></span>targetRow.ngoaiTruDenNgay <i>\"ngoaiTruDenNgay\"</i><span style=\"color: navy\">;</span>#xD;\n<span style=\"color: navy\">}#xD;\n#xD;\n</span></pre></div>"
  ] ;
  fhir:StructureMap.url [ fhir:value "http://fhir.hl7.org.vn/core/StructureMap/vn-sm-bhyt-xml7-discharge-paper"] ;
  fhir:StructureMap.identifier [
     fhir:index -1 ;
     fhir:Identifier.system [ fhir:value "urn:ietf:rfc:3986" ] ;
     fhir:Identifier.value [ fhir:value "urn:oid:2.25.161089673617632664299011809196868855799.43.10" ]
  ] ;
  fhir:StructureMap.version [ fhir:value "0.8.0"] ;
  fhir:StructureMap.name [ fhir:value "BHYTXML7DischargePaperLMStructureMap"] ;
  fhir:StructureMap.title [ fhir:value "Bảng 7 giấy ra viện — XML7 Discharge Paper Logical Model — StructureMap"] ;
  fhir:StructureMap.status [ fhir:value "draft"] ;
  fhir:StructureMap.experimental [ fhir:value "false"^^xsd:boolean] ;
  fhir:StructureMap.date [ fhir:value "2026-04-28"^^xsd:date] ;
  fhir:StructureMap.publisher [ fhir:value "Omi HealthTech / VN Core FHIR Community Initiative"] ;
  fhir:StructureMap.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:StructureMap.description [ fhir:value "Generated StructureMap scaffold for Bảng 7 giấy ra viện — XML7 Discharge Paper Logical Model. Source semantics come from the logical model mapping annotations in `BHYTXML7DischargePaperLM.fsh` and remain aligned with the Python BHYT round-trip export adapter."] ;
  fhir:StructureMap.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:StructureMap.purpose [ fhir:value "Publish canonical, reviewable FHIR-to-BHYT XML mapping artifacts for XML1-XML12 without duplicating field-level mapping semantics across FSH, wiki, and export code."] ;
  fhir:StructureMap.structure [
     fhir:index -1 ;
     fhir:StructureMap.structure.url [
       fhir:value "http://fhir.hl7.org.vn/core/StructureDefinition/vn-core-bhyt-submission-bundle" ;
       fhir:link <http://fhir.hl7.org.vn/core/StructureDefinition/vn-core-bhyt-submission-bundle>
     ] ;
     fhir:StructureMap.structure.mode [ fhir:value "source" ] ;
     fhir:StructureMap.structure.alias [ fhir:value "BHYTSubmissionBundle" ] ;
     fhir:StructureMap.structure.documentation [ fhir:value "FHIR-native source bundle profile used by the repository round-trip adapter." ]
  ], [
     fhir:index -1 ;
     fhir:StructureMap.structure.url [
       fhir:value "http://fhir.hl7.org.vn/core/StructureDefinition/bhytXml7DischargePaperLm" ;
       fhir:link <http://fhir.hl7.org.vn/core/StructureDefinition/bhytXml7DischargePaperLm>
     ] ;
     fhir:StructureMap.structure.mode [ fhir:value "target" ] ;
     fhir:StructureMap.structure.alias [ fhir:value "BHYTXML7DischargePaperLM" ] ;
     fhir:StructureMap.structure.documentation [ fhir:value "Bảng 7 giấy ra viện — XML7 Discharge Paper Logical Model" ]
  ] ;
  fhir:StructureMap.group [
     fhir:index -1 ;
     fhir:StructureMap.group.name [ fhir:value "MapBHYTXML7DischargePaperLM" ] ;
     fhir:StructureMap.group.typeMode [ fhir:value "none" ] ;
     fhir:StructureMap.group.documentation [ fhir:value "Rows are derived from discharge Composition/DocumentReference, the linked Encounter, Condition, Practitioner and guardian/temporary card data. Generated from logical-model `^mapping` annotations. Fields still missing a field-level `^mapping.map` entry remain outside this StructureMap and are tracked in `wiki/mappings/bhyt-output-data/machine/structuremap-coverage.json`." ] ;
     fhir:StructureMap.group.input [
       fhir:index -1 ;
       fhir:StructureMap.group.input.name [ fhir:value "sourceBundle" ] ;
       fhir:StructureMap.group.input.type [ fhir:value "BHYTSubmissionBundle" ] ;
       fhir:StructureMap.group.input.mode [ fhir:value "source" ] ;
       fhir:StructureMap.group.input.documentation [ fhir:value "VN Core BHYT submission bundle." ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.input.name [ fhir:value "targetRow" ] ;
       fhir:StructureMap.group.input.type [ fhir:value "BHYTXML7DischargePaperLM" ] ;
       fhir:StructureMap.group.input.mode [ fhir:value "target" ] ;
       fhir:StructureMap.group.input.documentation [ fhir:value "Bảng 7 giấy ra viện — XML7 Discharge Paper Logical Model" ]
     ] ;
     fhir:StructureMap.group.rule [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "maLk" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "maLkSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "maLk" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: MA_LK - Mã liên kết hồ sơ FHIR path: VNCoreClaim.identifier[MALK].value" ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "soLuuTru" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "soLuuTruSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "soLuuTru" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: SO_LUU_TRU - Số lưu trữ/số hồ sơ bệnh án FHIR path: VNCoreComposition.identifier.value | VNCoreDocumentReference.identifier.value" ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "maYte" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "maYteSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "maYte" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: MA_YTE - Mã y tế/mã người bệnh FHIR path: VNCorePatient.identifier[MRN].value" ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "maKhoaRv" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "maKhoaRvSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "maKhoaRv" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: MA_KHOA_RV - Mã khoa ra viện/tổng kết FHIR path: VNCoreEncounter.location.location.resolve().identifier.value | VNCoreOrganizationDepartment.identifier.value" ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "ngayVao" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "ngayVaoSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "ngayVao" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: NGAY_VAO - Ngày vào viện FHIR path: VNCoreEncounter.period.start" ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "ngayRa" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "ngayRaSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "ngayRa" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: NGAY_RA - Ngày ra viện FHIR path: VNCoreEncounter.period.end | VNCoreComposition.date" ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "maDinhChiThai" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "maDinhChiThaiSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "maDinhChiThai" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: MA_DINH_CHI_THAI - Mã đình chỉ thai FHIR path: VNCoreProcedure.code | VNCoreCondition.code Mapping note: MA_DINH_CHI_THAI='1' (đình chỉ thai nghén) tương ứng với sự tồn tại một VNCoreProcedure đình chỉ thai nghén (termination of pregnancy); '0' là không đình chỉ. Chưa có slice/mã cố định cho thủ thuật đình chỉ thai nên dùng Procedure.code; quan hệ điều kiện với 3 trường chi tiết theo invariant bhyt-xml7-abortion-fields-required (nhất quán nhóm đình chỉ thai với BHYTXML11SickLeaveLM)." ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "nguyenNhanDinhChi" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "nguyenNhanDinhChiSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "nguyenNhanDinhChi" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: NGUYENNHAN_DINHCHI - Nguyên nhân đình chỉ thai FHIR path: VNCoreProcedure.reasonCode.text | VNCoreProcedure.reasonReference.resolve().code | VNCoreCondition.code Mapping note: Nguyên nhân đình chỉ thai nghén — ghi dạng text hoặc mã ICD-10 chẩn đoán liên quan (VNCoreCondition); trường hợp bất thường/bệnh lý thai nhi tham chiếu danh mục VNFetalSexDisclosureDiseaseVS (căn cứ TT 11/2026/TT-BYT). Bắt buộc khi MA_DINH_CHI_THAI='1' (invariant bhyt-xml7-abortion-fields-required)." ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "thoiGianDinhChi" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "thoiGianDinhChiSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "thoiGianDinhChi" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: THOIGIAN_DINHCHI - Thời gian đình chỉ thai FHIR path: VNCoreProcedure.performedDateTime Mapping note: Thời điểm thực hiện đình chỉ thai nghén (định dạng yyyymmddHHMM). Bắt buộc khi MA_DINH_CHI_THAI='1' (invariant bhyt-xml7-abortion-fields-required)." ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "tuoiThai" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "tuoiThaiSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "tuoiThai" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: TUOI_THAI - Tuổi thai FHIR path: VNCoreProcedure | future tuổi-thai gestational-age extension Mapping note: Tuần tuổi thai thực tế (1–42 tuần) tại thời điểm đình chỉ. FHIR base không có phần tử tuổi thai trên Procedure nên đích mã hoá qua extension gestational-age để future (hoặc Observation LOINC 18185-9). Bắt buộc khi MA_DINH_CHI_THAI='1' (invariant bhyt-xml7-abortion-fields-required)." ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "chanDoanRv" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "chanDoanRvSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "chanDoanRv" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: CHAN_DOAN_RV - Chẩn đoán ra viện FHIR path: VNCoreComposition.section[diagnosis].entry.resolve().code | VNCoreCondition.code | section.text" ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "ppDieuTri" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "ppDieuTriSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "ppDieuTri" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: PP_DIEUTRI - Phương pháp điều trị (nội khoa, ngoại khoa, xạ trị, hoá trị hoặc kết hợp) FHIR path: VNCoreComposition.section[dischargeSummary].text | VNCoreProcedure.category | future phương-pháp-điều-trị extension Mapping note: Ghi phương pháp điều trị (nội khoa, ngoại khoa, xạ trị, hoá trị hoặc xạ trị kết hợp nội khoa) theo hướng dẫn TT 18/2022/TT-BYT. QĐ 4750/QĐ-BYT (trong chuẩn QĐ 3176/QĐ-BYT) sửa đổi toàn bộ diễn giải và tăng kích thước tối đa lên n ký tự. Chưa có code system phương pháp điều trị riêng nên đích mã hoá tạm để future extension." ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "ghiChu" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "ghiChuSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "ghiChu" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: GHI_CHU - Ghi chú FHIR path: VNCoreDocumentReference.description | VNCoreComposition.section.text" ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "maTtdv" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "maTtdvSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "maTtdv" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: MA_TTDV - Mã thủ trưởng đơn vị/người ký FHIR path: VNCoreComposition.attester.party.resolve().identifier.value | VNCoreDocumentReference.authenticator.resolve().identifier.value" ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "maBs" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "maBsSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "maBs" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: MA_BS - Mã bác sĩ FHIR path: VNCoreComposition.author.resolve().identifier.value | VNCorePractitioner.identifier.value" ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "tenBs" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "tenBsSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "tenBs" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: TEN_BS - Tên bác sĩ FHIR path: VNCoreComposition.author.display | VNCorePractitioner.name.text" ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "ngayCt" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "ngayCtSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "ngayCt" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: NGAY_CT - Ngày cấp chứng từ FHIR path: VNCoreDocumentReference.date | VNCoreComposition.date" ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "maCha" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "maChaSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "maCha" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: MA_CHA - Mã cha FHIR path: VNCoreRelatedPerson.where(relationship.coding.code='FTH').identifier[CCCD].value | VNCorePatient.contact.where(relationship.coding.code='FTH').name" ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "maMe" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "maMeSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "maMe" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: MA_ME - Mã mẹ FHIR path: VNCoreRelatedPerson.where(relationship.coding.code='MTH').identifier[CCCD].value | VNCorePatient.contact.where(relationship.coding.code='MTH').name" ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "maTheTam" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "maTheTamSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "maTheTam" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: MA_THE_TAM - Mã thẻ tạm FHIR path: VNCoreCoverage.identifier.value Mapping note: Temporary card identifiers are kept as Coverage.identifier until a dedicated temporary-card slice is profiled." ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "hoTenCha" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "hoTenChaSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "hoTenCha" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: HO_TEN_CHA - Họ tên cha FHIR path: VNCoreRelatedPerson.where(relationship.coding.code='FTH').name.text | VNCorePatient.contact.where(relationship.coding.code='FTH').name.text" ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "hoTenMe" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "hoTenMeSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "hoTenMe" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: HO_TEN_ME - Họ tên mẹ FHIR path: VNCoreRelatedPerson.where(relationship.coding.code='MTH').name.text | VNCorePatient.contact.where(relationship.coding.code='MTH').name.text" ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "soNgayNghi" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "soNgayNghiSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "soNgayNghi" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: SO_NGAY_NGHI - Số ngày nghỉ FHIR path: Derived from VNCoreDocumentReference.context.period | VNCoreComposition.event.period" ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "ngoaiTruTuNgay" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "ngoaiTruTuNgaySource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "ngoaiTruTuNgay" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: NGOAITRU_TUNGAY - Ngoại trú từ ngày FHIR path: VNCoreDocumentReference.context.period.start | VNCoreComposition.event.period.start" ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "ngoaiTruDenNgay" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "ngoaiTruDenNgaySource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "ngoaiTruDenNgay" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: NGOAITRU_DENNGAY - Ngoại trú đến ngày FHIR path: VNCoreDocumentReference.context.period.end | VNCoreComposition.event.period.end" ]
     ]
  ] .

# - ontology header ------------------------------------------------------------

<http://hl7.org/fhir/StructureMap/vn-sm-bhyt-xml7-discharge-paper.ttl> a owl:Ontology ;
  owl:imports fhir:fhir.ttl ;
  owl:versionIRI <http://build.fhir.org/StructureMap/vn-sm-bhyt-xml7-discharge-paper.ttl> .