@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 sct: <http://snomed.info/id/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

# - resource -------------------------------------------------------------------

<http://fhir.hl7.org.vn/core/MedicationRequest/ExampleMedicationRequestCombinedModern> a fhir:MedicationRequest ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:Resource.id [ fhir:value "ExampleMedicationRequestCombinedModern"] ;
  fhir:Resource.meta [
     fhir:Meta.profile [
       fhir:value "http://fhir.hl7.org.vn/core/StructureDefinition/vn-core-outpatient-prescription" ;
       fhir:index -1 ;
       fhir:link <http://fhir.hl7.org.vn/core/StructureDefinition/vn-core-outpatient-prescription>
     ]
  ] ;
  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: MedicationRequest ExampleMedicationRequestCombinedModern</b></p><a name=\"ExampleMedicationRequestCombinedModern\"> </a><a name=\"hcExampleMedicationRequestCombinedModern\"> </a><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\"/><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-vn-core-outpatient-prescription.html\">Đơn thuốc ngoại trú VN Core — VN Core Outpatient Prescription Profile</a></p></div><p><b>status</b>: Active</p><p><b>intent</b>: Order</p><p><b>category</b>: <span title=\"Codes:{http://terminology.hl7.org/CodeSystem/medicationrequest-category outpatient}\">Outpatient</span></p><p><b>medication</b>: <span title=\"Codes:{http://www.whocc.no/atc N02BE01}\">Paracetamol 500mg</span></p><p><b>subject</b>: <a href=\"Patient-ExamplePatientNguyenVanAn.html\">Nguyễn Văn An</a></p><p><b>encounter</b>: <a href=\"Encounter-ExampleEncounterYHCT.html\">Encounter: extension = Đến khám,Đỡ; identifier = Mã lượt khám chữa bệnh: VNMaLuotKCB#LK-2026-03-22-0087; status = finished; class = ambulatory (ActCode#AMB); type = Khám bệnh; period = 2026-03-22 08:00:00+0700 --&gt; 2026-03-22 10:30:00+0700; reasonCode = </a></p><p><b>authoredOn</b>: 2026-03-22 09:30:00+0700</p><p><b>requester</b>: <a href=\"Practitioner-ExamplePractitionerBSCKII.html\">BS.CKII YHCT Nguyễn Thị Lan</a></p><p><b>reasonCode</b>: <span title=\"Codes:{http://fhir.hl7.org.vn/core/CodeSystem/vn-icd10-cs M54.5}\">Đau thắt lưng</span></p><p><b>groupIdentifier</b>: <a href=\"NamingSystem-vn-prescription-code-ns.html\" title=\"Hệ thống định danh Mã đơn thuốc điện tử — 14 ký tự, ghép từ mã cơ sở KCB (05) + mã đơn (07) + dấu gạch + ký tự loại đơn. Cơ sở bán lẻ thuốc bán theo mã đơn và báo cáo về donthuocquocgia.vn.#xA;#xA;**Ai sinh mã.** Bộ Y tế là cơ quan quản trị cấu trúc mã và Hệ thống đơn thuốc quốc gia, nhưng mã cụ thể do phần mềm nguồn của cơ sở KCB (HIS) tự sinh theo cấu trúc rồi gửi lên: QĐ 808/QĐ-BYT đặt `ma_don_thuoc` trong FormData của request `/api/v1/gui-don-thuoc`, còn TT 26/2025/TT-BYT Phụ lục I chỉ nói mã 'được tạo ra tự động theo cấu trúc quy định' mà không nêu chủ thể. Không mô tả cổng quốc gia như bên cấp phát từng mã.#xA;#xA;**Ký tự loại đơn.** TT 26/2025/TT-BYT: `N` đơn thuốc gây nghiện, `H` đơn thuốc hướng thần/tiền chất, `C` đơn thuốc khác. TT 55/2025/TT-BYT dùng `T` cho đơn thuốc thang. QĐ 808/QĐ-BYT (contract cổng, ban hành trước) dùng bộ `C/N/H/Y` với `Y` cho đơn y học cổ truyền — giá trị legacy ở tầng transport, không dùng cho dữ liệu canonical.#xA;Căn cứ:#xA;- **TT 26/2025/TT-BYT** — kê đơn thuốc hoá dược, sinh phẩm ngoại trú; Điều 12 (liên thông đơn thuốc quốc gia, lĩnh thuốc trong 05 ngày kể từ ngày kê), Phụ lục I (cấu trúc mã đơn thuốc điện tử 14 ký tự); bãi bỏ TT 27/2021/TT-BYT từ 01/07/2025#xA;- **QĐ 808/QĐ-BYT (01/4/2022)** — hướng dẫn kết nối Hệ thống đơn thuốc quốc gia; cấu trúc mã đơn 14 ký tự#xA;- **QĐ 425/QĐ-BYT (05/02/2025)** — Quy chế quản lý, vận hành, sử dụng Hệ thống thông tin Quốc gia về quản lý kê đơn thuốc và bán thuốc theo đơn.\">VNPrescriptionCode</a>/790010000784-C</p><h3>DosageInstructions</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Sequence</b></td><td><b>Text</b></td><td><b>Timing</b></td><td><b>AsNeeded[x]</b></td><td><b>Route</b></td></tr><tr><td style=\"display: none\">*</td><td>1</td><td>Uống 1 viên khi đau, tối đa 3 viên/ngày, cách nhau ít nhất 6 giờ.</td><td>3 per 1 day</td><td>true</td><td><span title=\"Codes:{http://snomed.info/sct 26643006}\">Uống</span></td></tr></table><h3>DispenseRequests</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Quantity</b></td></tr><tr><td style=\"display: none\">*</td><td>20 viên<span style=\"background: LightGoldenRodYellow\"> (Details: UCUM  code{tablet} = '{tablet}')</span></td></tr></table></div>"
  ] ;
  fhir:MedicationRequest.status [ fhir:value "active"] ;
  fhir:MedicationRequest.intent [ fhir:value "order"] ;
  fhir:MedicationRequest.category [
     fhir:index -1 ;
     fhir:CodeableConcept.coding [
       fhir:index -1 ;
       fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/medicationrequest-category" ] ;
       fhir:Coding.code [ fhir:value "outpatient" ] ;
       fhir:Coding.display [ fhir:value "Outpatient" ]
     ]
  ] ;
  fhir:MedicationRequest.medicationCodeableConcept [
     fhir:CodeableConcept.coding [
       fhir:index -1 ;
       fhir:Coding.system [ fhir:value "http://www.whocc.no/atc" ] ;
       fhir:Coding.code [ fhir:value "N02BE01" ] ;
       fhir:Coding.display [ fhir:value "Paracetamol" ]
     ] ;
     fhir:CodeableConcept.text [ fhir:value "Paracetamol 500mg" ]
  ] ;
  fhir:MedicationRequest.subject [
     fhir:link <http://fhir.hl7.org.vn/core/Patient/ExamplePatientNguyenVanAn> ;
     fhir:Reference.reference [ fhir:value "Patient/ExamplePatientNguyenVanAn" ] ;
     fhir:Reference.display [ fhir:value "Nguyễn Văn An" ]
  ] ;
  fhir:MedicationRequest.encounter [
     fhir:link <http://fhir.hl7.org.vn/core/Encounter/ExampleEncounterYHCT> ;
     fhir:Reference.reference [ fhir:value "Encounter/ExampleEncounterYHCT" ]
  ] ;
  fhir:MedicationRequest.authoredOn [ fhir:value "2026-03-22T09:30:00+07:00"^^xsd:dateTime] ;
  fhir:MedicationRequest.requester [
     fhir:link <http://fhir.hl7.org.vn/core/Practitioner/ExamplePractitionerBSCKII> ;
     fhir:Reference.reference [ fhir:value "Practitioner/ExamplePractitionerBSCKII" ] ;
     fhir:Reference.display [ fhir:value "BS.CKII YHCT Nguyễn Thị Lan" ]
  ] ;
  fhir:MedicationRequest.reasonCode [
     fhir:index -1 ;
     fhir:CodeableConcept.coding [
       fhir:index -1 ;
       fhir:Coding.system [ fhir:value "http://fhir.hl7.org.vn/core/CodeSystem/vn-icd10-cs" ] ;
       fhir:Coding.code [ fhir:value "M54.5" ] ;
       fhir:Coding.display [ fhir:value "Low back pain" ]
     ] ;
     fhir:CodeableConcept.text [ fhir:value "Đau thắt lưng" ]
  ] ;
  fhir:MedicationRequest.groupIdentifier [
     fhir:Identifier.system [ fhir:value "http://fhir.hl7.org.vn/core/sid/don-thuoc-quoc-gia" ] ;
     fhir:Identifier.value [ fhir:value "790010000784-C" ]
  ] ;
  fhir:MedicationRequest.dosageInstruction [
     fhir:index -1 ;
     fhir:Dosage.sequence [ fhir:value "1"^^xsd:integer ] ;
     fhir:Dosage.text [ fhir:value "Uống 1 viên khi đau, tối đa 3 viên/ngày, cách nhau ít nhất 6 giờ." ] ;
     fhir:Dosage.timing [
       fhir:Timing.repeat [
         fhir:Timing.repeat.frequency [ fhir:value "3"^^xsd:positiveInteger ] ;
         fhir:Timing.repeat.period [ fhir:value "1"^^xsd:decimal ] ;
         fhir:Timing.repeat.periodUnit [ fhir:value "d" ]
       ]
     ] ;
     fhir:Dosage.asNeededBoolean [ fhir:value "true"^^xsd:boolean ] ;
     fhir:Dosage.route [
       fhir:CodeableConcept.coding [
         fhir:index -1 ;
         a sct:26643006 ;
         fhir:Coding.system [ fhir:value "http://snomed.info/sct" ] ;
         fhir:Coding.code [ fhir:value "26643006" ] ;
         fhir:Coding.display [ fhir:value "Oral route" ]
       ] ;
       fhir:CodeableConcept.text [ fhir:value "Uống" ]
     ]
  ] ;
  fhir:MedicationRequest.dispenseRequest [
     fhir:MedicationRequest.dispenseRequest.quantity [
       fhir:Quantity.value [ fhir:value "20"^^xsd:decimal ] ;
       fhir:Quantity.unit [ fhir:value "viên" ] ;
       fhir:Quantity.system [ fhir:value "http://unitsofmeasure.org" ] ;
       fhir:Quantity.code [ fhir:value "{tablet}" ]
     ]
  ] .

# - ontology header ------------------------------------------------------------

<http://fhir.hl7.org.vn/core/MedicationRequest/ExampleMedicationRequestCombinedModern.ttl> a owl:Ontology ;
  owl:imports fhir:fhir.ttl .

# -------------------------------------------------------------------------------------

